Faithlife / styled-ui

Faithlife UI styleguide and set of components
https://faithlife.github.io/styled-ui/
MIT License
13 stars 50 forks source link

[BUG] Variants break when using styled(Button) and an `as` prop #506

Open korbinancell opened 3 years ago

korbinancell commented 3 years ago

Describe the bug Works as expected:

<Button as="a" variant="primary">link</Button>

Doesn't:

const Fancy = styled(Button).attrs({ as: 'a', variant: 'primary' })``
<Fancy>link</Fancy>