I'm trying to build a react-native component using styled components. Here is the snippet
import { View } from 'react-native'
import styled from 'styled-components'
const StyledPromocode = styled(View)`
border-bottom-width: 1,
borderColor: #CCCCCC,
borderStyle: solid
`
But if I use this component in my render method I always get an error
Invariant Violation: Invalid prop
borderBottomWidthof typestringsupplied toStyleSheet generated, expectednumber. StyleSheet generated: { "borderBottomWidth": "1,", "borderColor": "#CCCCCC,", "borderStyle": "solid" }
As you can see from the code above, border-bottom-width equals 1, which is a number value.
Do styled-components convert all values to a string under the hood?
I know that I can use StyleSheet.create to get what I need, but I also would like to know if there is any way to define properties like border-bottom-width, height, width and etc via styled-components.
If not, then does it mean that it doesn't make sense to use styled-components in react-native, because, obviously, errors like this would appear all the time?