-
Hi. I'm fiddling with reakit-system to make my own components and find it pretty intuitive and easy to compose elements this way, but I'm not sure how to tackle the case where default for What I'm trying to do is to make component Is this case even valid for reakit-system, or should I make wrapping component that will provide export function Heading({as, level, ...props}: PropsOf<typeof SystemHeading>) {
let type = as || `h${level}`;
return <SystemHeading level={level} as={type} {...props}/>
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @ezhikov! Something like this may work: https://codesandbox.io/s/amazing-sea-fiy1g?file=/src/App.js But since |
Beta Was this translation helpful? Give feedback.
Hi @ezhikov!
Something like this may work: https://codesandbox.io/s/amazing-sea-fiy1g?file=/src/App.js
But since
reakit-system
is super experimental and will likely change, it's probably better that you come up with your own solution.