Basics
Styling with Skyle is extremely easy.
- Class Component
- Functional Component
- Add the
@styled
above the component. - Add
styles = styles
at the top of the component. - Import/create a
StyleSheet
from 'skyle'. - Use
this.styles
to style your components!
If you don't have decorators enabled, you can also pass the component through a function:
- Use the
useStyles
hook to access computed styles. - Import/create a
StyleSheet
from 'skyle'. - Use the hook's return value to style your components!