-
Notifications
You must be signed in to change notification settings - Fork 65
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
Adding Background Colors Border Radius #127
Comments
No, you cannot do it with the existing code. However you can easily create a solid variant of an existing icon using the following steps:
However I think this is hack-ish and you should fork the And about the border-radius, I am not sure what you meant by that |
I might be missing something, but why not using the color prop? Please see this example https://codesandbox.io/s/color-prop-in-grommet-icons-vb6by You can also customize the color property on the theme level, to make the color consistent towards the app. |
The |
@ranjan-purbey can you please share with me an example of what is it that can't be achieved? |
Try it for Cursor icon. You will notice it only colors the border. What
if the user wants a solid variant of the same icon? That can be achieved
using the steps mentioned in my previous comment.
|
@ranjan-purbey Thank you for the prompt replies. I'm not sure if this should be a generic design question or a request to enhance some icons that should allow filling color but currently don't. so I'll label the issue as @Moshemo , or any other user, If you have any icon in particular, you'd like to enhance by filling the color please share with us and we'll advise accordingly. |
@ShimiSun I agree with you that this behavior is controlled by individual icons, and the library itself allows to use the |
@ranjan-purbey any updates here? |
As mentioned in above discussion, the choice of opting for a solid variant of an icon depends on the icon's creator. If yours is a one-off case, you can use the workaround in one of my previous replies. Else if sufficient people need this, I can create a PR with solid variants of existing icons. |
@ranjan-purbey my use case is not one-off. I have a large number of icons for which this behavior would be desirable. It appears that @Moshemo (who filed this issue originally) and a few others who reacted positively to your message might all be interested in this functionality. It seems like it'd be worth it to create solid variants of existing icons. If you were able to make an example PR with one solid variant icon, I could contribute as well |
Alright, I'll create one. Give me a day |
@ranjan-purbey I've actually decided to switch icon libraries, so if you are only doing this for me, then you don't have to. I appreciate the willingness to help out |
Related to #274 |
Is there an easy way to add a background color and/or border-radius to Grommet Icons. If so, can you please let me know how?
Thanks.
The text was updated successfully, but these errors were encountered: