Fix bad stroke application for gr,tb,io5,fi,hi icon sets

This commit is contained in:
Xevion
2023-02-17 11:56:28 -06:00
parent 20ad36eab7
commit 0096f690f7
2 changed files with 8 additions and 3 deletions

View File

@@ -29,6 +29,7 @@ const IconInternal: FunctionComponent<IconInternalProps> = ({label, children, on
</div>
}
const forcedSets = ['gr', 'tb', 'io5', 'fi', 'hi'];
const DisplayIconSingle: FunctionComponent<DisplayIconSingleProps> = ({setId, id}) => {
// eslint-disable-next-line
const IconSet = loadable.lib(() => getIcons(setId));
@@ -42,7 +43,8 @@ const DisplayIconSingle: FunctionComponent<DisplayIconSingleProps> = ({setId, id
return <IconInternal label={id} onClick={() => {
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>
}}

View File

@@ -16,6 +16,9 @@ code {
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;
}
}