compiled
compiled copied to clipboard
Destructuring in a style interpolation does not pass valid HTML attributes down to the DOM element
Outcome of #403
Right now following works for MemberExpression
(Implemented here)
styled.div`
color: ${props => props.color}; // added to HTML element
background-color: ${props => props.bgColor}; // NOT added to HTML element
`;
It doesn't work for Identifier
as of now which is coming from userland:
styled.div`
color: ${({ color }) => color}; // should be added to HTML element
background-color: ${({ bgColor }) => bgColor}; // should NOT be added to HTML element
`;