const styles = StyleSheet.create({
container : {
flex : 1,
backgroundColor : config.getColor('bg'),
},
title : {
marginLeft : 80,
marginTop : 30,
height : 35,
width : 100,
borderRadius : 17,
borderWidth : 1,
borderColor : config.getColor('theme'),
fontSize : 17,
color : config.getColor('theme')
}
});
when I console.log styles.title,I got a number.so how to convert it to a object?
You can use the flatten method.
Example:
StyleSheet.flatten(styles.title)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With