Overriding with "as" prop seems to not work correctly
Opened this issue · 0 comments
michalkvasnicak commented
We have following:
const Button = createComponent('button', {
styles: {
// some styles with variants
},
variants: [...]
});
const AddButton = createComponent(Button, {
defaultProps: {
type: 'button',
variant: 'variant from Button'
},
styles: {
fontSize: 0,
lineHeight: 0,
fontWeight: 'semiBold',
mb: 2,
},
});
then when we do:
<AddButton as="a">Add</AddButton>
it seems that styles from Button
are not applied at all and variants are passed to a
but aren't processed resulting to variant
HTML attribute.