You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React supports rendering custom DOM elements as long as they have a hyphen in the tag name. React completely ignores props on these components, including the className prop.
As a result, the prop is converted into a literal attribute in the DOM (and className is an invalid attribute).
Suggested solution:
If the passed tagName is a string, and it contains a hyphen - react-emotion should instead pass down a class prop, allowing Web Components to be styled.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
emotion
version: 9.1.1react
version: 16.3.0Relevant code.
Problem description:
React supports rendering custom DOM elements as long as they have a hyphen in the tag name. React completely ignores props on these components, including the
className
prop.As a result, the prop is converted into a literal attribute in the DOM (and
className
is an invalid attribute).Suggested solution:
If the passed
tagName
is a string, and it contains a hyphen -react-emotion
should instead pass down aclass
prop, allowing Web Components to be styled.The text was updated successfully, but these errors were encountered: