Skip to content

default 'as' in composite component. #444

Answered by makezi
VaibhavAcharya asked this question in Help
Discussion options

You must be logged in to vote

defaultProps should work here:

export const Paragraph = styled(Text, { ... });

Paragraph.defaultProps = {
  as: 'p'
}

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@peduarte
Comment options

Answer selected by peduarte
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants