mirror of
https://github.com/Xevion/icons.git
synced 2025-12-09 20:07:26 -06:00
Fix bad stroke application for gr,tb,io5,fi,hi icon sets
This commit is contained in:
@@ -29,6 +29,7 @@ const IconInternal: FunctionComponent<IconInternalProps> = ({label, children, on
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const forcedSets = ['gr', 'tb', 'io5', 'fi', 'hi'];
|
||||||
const DisplayIconSingle: FunctionComponent<DisplayIconSingleProps> = ({setId, id}) => {
|
const DisplayIconSingle: FunctionComponent<DisplayIconSingleProps> = ({setId, id}) => {
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
const IconSet = loadable.lib(() => getIcons(setId));
|
const IconSet = loadable.lib(() => getIcons(setId));
|
||||||
@@ -42,7 +43,8 @@ const DisplayIconSingle: FunctionComponent<DisplayIconSingleProps> = ({setId, id
|
|||||||
return <IconInternal label={id} onClick={() => {
|
return <IconInternal label={id} onClick={() => {
|
||||||
void navigator.clipboard.writeText(`import {${id}} from "react-icons/${setId}";`)
|
void navigator.clipboard.writeText(`import {${id}} from "react-icons/${setId}";`)
|
||||||
}}>
|
}}>
|
||||||
<Icon className={classNames(iconClass, setId === 'gr' ? 'forceStroke' : null)}/>
|
|
||||||
|
<Icon className={classNames(iconClass, forcedSets.indexOf(setId) != -1 ? 'forceStroke' : null)}/>
|
||||||
</IconInternal>
|
</IconInternal>
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ code {
|
|||||||
Bitstream Vera Sans Mono, Courier New, monospace;
|
Bitstream Vera Sans Mono, Courier New, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
.forceStroke > path, g {
|
//
|
||||||
stroke: currentColor;
|
.forceStroke {
|
||||||
|
> path:not([stroke="none"]), g, rect, line, polyline, circle, polygon {
|
||||||
|
stroke: currentColor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user