Badge property 'textStyle' has type ViewStyle instead of TextStyle
See original GitHub issueExplain what you did (Required)
I used several Badges to work as category tags.
Expected behavior (Required)
I wanted to change the text color using textStyle attribute:
<Badge textStyle={{color: 'white'}} />
Describe the bug (Required)
An error shows because the textStyle type is not TextStyle, but ViewStyle
To Reproduce (Required)
Just use a Badge and try to pass TextStyle attributes in the textStyle property. Screenshots (Required)
Docs:
Package Code:
Error Example:
Your Environment (Required):
software | version |
---|---|
react-native-elements | 3.3.2 |
react-native | 0.64.0 |
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
TypeScript and React Native: Are the type definitions for RN ...
2 : I can't see how you implement your styles but you can test something like this? import { StyleSheet, TextStyle, ViewStyle }...
Read more >textStyle property - Badge class - material library - Dart API
The DefaultTextStyle for the badge's label. The text style's color is overwritten by the textColor. This value is only used if label is...
Read more >[styled-components] No overload matches this call for attrs ...
I got the No overload matches this call error in a similar scenario and have a workaround. What I encountered. I defined a...
Read more >Text Style Props - React Native
Specifies font weight. The values 'normal' and 'bold' are supported for most fonts. Not all fonts have a variant for each of the...
Read more >react-native-table-component - npm
Cells in Col and Cols components do not support adaptive height. Please set the magin value in the textStyle property to adjust the...
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
Yes, of course 😄
@mpochron will be fixed soon