How to set the stroke-width?
Rednas83 opened this issue · comments
Tried:
<Icon name="feather:home" color="green" size="20%" stroke-width="2" />
<Icon name="feather:home" color="green" size="20%" stroke-width="2px" />
<Icon name="feather:home" color="green" size="20%" :stroke-width="'2'" />
<Icon name="feather:home" color="green" size="20%" :stroke-width="'2px'" />
<Icon name="feather:home" color="green" size="20%" style="stroke-width: 2" ; />
<Icon name="feather:home" color="green" size="20%" style="stroke-width: 2px" />
I am not sure this feature is supported though
Looks like it's not although the icon set itself has support for it.
Could it be possible to add support for it?
Iconify doesn't support that: https://iconify.design/docs/icon-components/svg-framework/dimensions.html. And I am not even sure it's possible for Iconify to do that in a universal way - I think you might use a iconset that supports pre-defined storke variants.
Looking at the website it is supported for some icon sets actually
https://icon-sets.iconify.design/feather/home/
Perhaps it can be achieved with
import { appendCustomStyle } from 'iconify-icon';
appendCustomStyle('svg [stroke-width="2"] { stroke-width: 1.5; }');
More info at iconify/iconify#196