Styled Components
You can use styled
api to create a Fower component, then you can use atomic props with the component.
info
styled
can be used in all React-like frameworks, such as React, React-native, Preact, etc.
#
Importimport { styled } from '@fower/styled'
#
Styling html elementThe element wrapped by styled
can use atomic props to change the style of the component.
SyntaxError: Unexpected token (1:8) 1 : return () ^
LIVE DEMO
#
Styling any Componentstyled
can style any component as long as it accepts a className prop.
SyntaxError: Unexpected token (1:8) 1 : return () ^
LIVE DEMO
#
With initial atomic propsIn order to better reuse styles, when using styled
to create a component, we can initialize some styles for the component.
SyntaxError: Unexpected token (1:8) 1 : return () ^
LIVE DEMO
#
Initial with object styleSyntaxError: Unexpected token (1:8) 1 : return () ^
LIVE DEMO
#
BothSyntaxError: Unexpected token (1:8) 1 : return () ^
LIVE DEMO