default 'as' in composite component. #444
Answered
by
makezi
VaibhavAcharya
asked this question in
Help
-
Example:
Here, I would want the Is there a way to set as prop as default on composite component ? |
Beta Was this translation helpful? Give feedback.
Answered by
makezi
Feb 28, 2021
Replies: 3 comments 1 reply
-
export const Paragraph = styled(Text, { ... });
Paragraph.defaultProps = {
as: 'p'
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
peduarte
-
@VaibhavAcharya check out #609 |
Beta Was this translation helpful? Give feedback.
0 replies
-
This does not work with typescript though. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
defaultProps
should work here: