Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feedback] React components should support style prop #1040

Open
iansan5653 opened this issue Nov 26, 2024 · 3 comments
Open

[Feedback] React components should support style prop #1040

iansan5653 opened this issue Nov 26, 2024 · 3 comments

Comments

@iansan5653
Copy link

The React Octicon components support the className prop, which makes it easy to apply custom styles to them. However, sometimes class-based styling is insufficient, such as when you need a fully dynamic style. For this, the style attribute is very important.

An example of its use might be when defining a dynamic icon color:

<SparkleFillIcon style={{color: ...}} />
@langermank
Copy link
Contributor

Hey @iansan5653, do you think the fill option could work for this? Here's an example: https://primer-6b9ae9b407-13348165.drafts.github.io/storybook/?path=/story/octicons--fill

@iansan5653
Copy link
Author

I think that does work for this specific problem. I still think that for consistency with other React components, it would be useful to support className styling we should also support inline styling via style. It's handy to have.

@tallys
Copy link
Contributor

tallys commented Dec 6, 2024

hey @iansan5653 thanks for opening the issue. We're not able to prioritize this at this time, but I will add it to our backlog for consideration when we revisit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants