Closed siriwatknp closed 5 months ago
A Pigment styled component (child) is replaced by as value provided to the parent:
as
const Child = styled('span')({ classes: ['child'] }); const Parent = styled(Child)({ classes: ['parent'] }); <Parent as="div" />; // <div class="parent" />
This behavior is different from Emotion & Styled-components where styles of child are propagated even as is provided to the parent.
const Child = styled('span')({ classes: ['child'] }); const Parent = styled(Child)({ classes: ['parent'] }); <Parent as="div" />; // <div class="child parent" />
Issue
A Pigment styled component (child) is replaced by
as
value provided to the parent:This behavior is different from Emotion & Styled-components where styles of child are propagated even
as
is provided to the parent.Expected