Various small changes
This commit is contained in:
parent
a44eea520a
commit
d9096b13e4
2 changed files with 6 additions and 4 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue