-
-
Save Heydon/d21779de69e8f84def86da98d1cfbc8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Heading aria-level={props.level ? props.level : null}>Heading text</Heading> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fun thing with the latest couple versions of Styled Components: you can use the
as
prop to have it use a different underlying HTML element; something like this might work:(I'm speculating about how much flexibility one has with defining
as
; at some point soonish I'll test this out and report back.)