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