Various small changes

This commit is contained in:
uwap 2020-10-19 07:12:38 +02:00
parent a44eea520a
commit d9096b13e4
2 changed files with 6 additions and 4 deletions

View file

@ -34,12 +34,12 @@ const iconChainUtils = <T> (cb: (x: T, p?: IconPropHelper) => Icon,
);
export const svg = (data: string, props?: IconPropHelper): Icon => {
const propColor = ((c: Color | (State) => Color) => (state: State) => {
const propColor = ((c: ?Color | (State) => Color) => (state: State) => {
if (typeof c === "function") {
return c(state);
}
return c;
})(props?.color ?? "black");
})(props?.color);
return {
render: (state) => (
<ReactIcon path={data} size={props?.size ?? 1.5}