-
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Support Styled Component Syntex
Support styled
- static
const StyledDiv = styled.div`
width: 100%
`
=>
const StyledDiv = (props: ComponentProps<'div'>)=><div {...props} className={"a" + " " + props.className} />
- variable
const StyledDiv = styled.div`
width: 100%;
bg: ${props=> props.blue};
${props => css`height: 100px`};
`
=>
const StyledDiv = (props: ComponentProps<'div'>)=><div {...props} className={"a b" + " " + (props=>"css-gen-class")(props) +" "+props.className} style={{
c: (props=>props.blue)(props),
...props.style}} />
- custom component
const StyledDiv = styled(A)`
width: 100%
`
=>
const StyledDiv = (props: ComponentProps<A>)=><A props={props} className={"a" + " " + props.className} />
- object expression
const StyledDiv = styled.div({w: '100%'})
=>
const StyledDiv = (props: ComponentProps<'div'>)=><div {...props} className={"a" + " " + props.className} />
ChiantiScarlett
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request