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

stroke width not calculated when passed as a prop to CheckIcon #155

Open
mikeyamato opened this issue May 15, 2023 · 4 comments
Open

stroke width not calculated when passed as a prop to CheckIcon #155

mikeyamato opened this issue May 15, 2023 · 4 comments

Comments

@mikeyamato
Copy link

I'm following the checkbox example in the documentation and added strokeWeight prop to <CheckIcon />. However, no matter what the value the weight doesn't change. I'm looking at the code and passing in the prop should work. I haven't tested this with other icons but I'm going to guess I'll see similar results. Meaning, no change.

<CheckIcon color={colors.white} strokeWidth={4} />
Screenshot 2023-05-15 at 4 41 18 PM
@yusupsupriyadi
Copy link

yusupsupriyadi commented Nov 30, 2023

And all the icons don't work, even though the stroke value is read

@mkellogg999
Copy link

I figured something out. In order to use "strokeWidth" you must also use "stroke". "stroke" should be set to the color you want the icon to be, so it would override the "color" prop.

I am also using the check icon, so naturally I don't want a rounded stroke. Unfortunately the check icon's path is already rounded, so even if you set strokeLinecap to "butt" and strokeLinejoin to "miter" the stroke will still be round.

@j-machuca
Copy link

j-machuca commented Jan 24, 2024

I might be late to the party and just want to add that if you're using tailwind you are going to need to do the following

<HomeIcon className="text-sky-500" strokeWidth={1} stroke="currentColor"/>

@benevbright
Copy link

benevbright commented Mar 25, 2024

is there any way to use css variable color?

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

No branches or pull requests

5 participants