Replies: 2 comments
-
The best way to do this is by adding a So, add the attribute: <button
disabled={disabled}
{...stylex.props(
styles.button
)}
{...props}
data-selector="icon-button"
>
{isLoading && (
<span {...stylex.props(styles.spinner)}>
<Spinner />
</span>
)}
{children}
</button> And use it in a standalone CSS file (not a CSS module, just a regular CSS file). [data-selector="icon-button"] [class~="material-symbols"] {
font-size: 1.25em;
color: red;
} Some additional notes:
How all of this helps. Lmk, if you're still dealing with issues or need any further clarification. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Okidoki, thanks :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
So, I have a button, and in that button I want to be able to have Icons, unlimited with icons, and add styles to these.
All my icons are from react-material-symbols, and they have the class "material-symbols" on them.
So the ideal thing I wish to do is
but from what I can find, that does not work right?
So my second approach was to add css-modules as well (even if that does not feel great) and do
but, I don't seem to be able to put classname at the same time as my StyleX styles. Can I?
Any ideas how I can target the "material-symbols" class from my button?
(which looks like this btw)
And I want to use it like this
Beta Was this translation helpful? Give feedback.
All reactions