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
styled components is awesome, but one problem it has is that it propagates all props to the html elements .
For example, if I have a prop specific to styling like "size", it will be propagated to HTML:
I'd like to avoid this. This library solved this problem by marking all props that shouldn't be propagated with "$" symbol. So my "size" prop would become "$size". Same goes for $theme and $as props. IMO it's a clear and concise solution.
The text was updated successfully, but these errors were encountered:
styled components is awesome, but one problem it has is that it propagates all props to the html elements .
For example, if I have a prop specific to styling like "size", it will be propagated to HTML:
sandbox link
I'd like to avoid this. This library solved this problem by marking all props that shouldn't be propagated with "$" symbol. So my "size" prop would become "$size". Same goes for
$theme
and$as
props. IMO it's a clear and concise solution.The text was updated successfully, but these errors were encountered: