Typings on Text component are incorrect on the latest release
See original GitHub issueThe latest release of Grommet (2.16.3) includes new additional sizes for the Text component. The typings for these new sizes are incorrect in that these properties are not optional.
'2xl?': {
size?: string;
height?: string;
maxWidth?: string;
};
3xl?': {
size?: string;
height?: string;
maxWidth?: string;
};
'4xl?': {
size?: string;
height?: string;
maxWidth?: string;
};
'5xl?': {
size?: string;
height?: string;
maxWidth?: string;
};
'6xl?': {
size?: string;
height?: string;
maxWidth?: string;
};
'
These sizes should be optional. The optional property should not be within the string value of the key.
Actual Behavior
URL, screen shot, or Codepen exhibiting the issue
Source in Code - lines: 1194 - 1217
Steps to Reproduce
Running Grommet with TypeScript causes these properties to be non-optional with custom themes.
Your Environment
- Grommet version: ^2.15.2
- Browser Name and version: Chrome Version 88.0.4324.96
- Operating System and version (desktop or mobile): Mac OS Catalina 10.15.7
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
A component is changing an uncontrolled input of type text to ...
A component is changing an uncontrolled input of type text to be controlled. Possible Solutions: 1- Define the fields in state as:
Read more >Wrong input inserting unwanted text #146 - GitHub
I have started using this library in my React Native app and came across the following issue. Steps to reproduce: Set up ...
Read more >Uncontrolled Components - React
In a controlled component, form data is handled by a React component. The alternative is uncontrolled components, where form data is handled by...
Read more >Controlled vs. uncontrolled components in React
In this tutorial, we'll explain the difference between controlled and uncontrolled components in React with practical examples.
Read more >How To Customize React Components with Props
Props are arguments that you provide to a JSX element in a React application. ... Open the new file in your text editor:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, feel free to make a contribution, this feature was introduced on 2.16.3 so that will be the explicit version of the issue for whoever tries to fix it.
My pleasure! It was a simple fix. I was especially motivated because the latest release broke our Builds and CI/CD at work. We just rolled our versions back.