Style Object Creation in React Native
See original GitHub issueFirst of all, I love styled components, so thank you guys a lot!!!
I have a question about react-native styles. Can I somehow generate a style sheet like object for react native with styled components. Many React Native components take several style objects, e.g. ScrollView (which takes an additional contentContainerStyle) or react navigation components (which take several styles in their factory methods), it would be nice to define those styles with styled components as well, including the use of theme variables. I would have expected the css
function to do something like that on native, but that doesn’t seem to be the case.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Style - React Native
With React Native, you style your application using JavaScript. All of the core components accept a prop named style. The style names and ......
Read more >React Native styling tutorial with examples - LogRocket Blog
Styling in React Native is done using JavaScript. Since React components have support for the style prop, you can also create an object...
Read more >Styling in React Native - Bits and Pieces
You can add styling to your component using style props you simply add style props to your element it accepts an object of...
Read more >How to combine multiple inline style objects? - reactjs
Array notaion is the best way of combining styles in react native. This shows how to combine 2 Style objects, <Text style={[styles.base, ...
Read more >React Native Styling: Structure for Style Organization
Conclusion · Styles are important: make them easy to find: Keep styles in the root application folder · Get atomic!: Build complicated Styles...
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
v5 still does not support this natively
Any update?
I built a tiny lib for convenience a while back. https://github.com/MrLoh/styled-css