fix build error
This commit is contained in:
parent
3e077fa247
commit
40bb3e6fae
|
@ -13,4 +13,6 @@ const Icon = forwardRef<SVGSVGElement, Props>(({ icon, ...rest }, ref) => {
|
|||
} else return <IconComponent ref={ref} {...rest} />;
|
||||
});
|
||||
|
||||
Icon.displayName = "Icon";
|
||||
|
||||
export default Icon;
|
||||
|
|
|
@ -24,22 +24,26 @@ const IconGrid = ({ query, color, weight, iconName, setIconName }: Props) => {
|
|||
return fuse.search(query).map((result) => result.item);
|
||||
}, [query]);
|
||||
|
||||
return filteredQueryResultsSelector.map((icon) => {
|
||||
const IconComponent = icon.Icon;
|
||||
return (
|
||||
<div
|
||||
key={icon.pascal_name}
|
||||
onClick={() => setIconName(icon.pascal_name)}
|
||||
className={`cursor-pointer btn p-1 box-border bg-base-100 border-none w-full ${
|
||||
icon.pascal_name === iconName
|
||||
? "outline outline-1 outline-primary"
|
||||
: ""
|
||||
}`}
|
||||
>
|
||||
<IconComponent size={32} weight={weight} color={color} />
|
||||
</div>
|
||||
);
|
||||
});
|
||||
return (
|
||||
<>
|
||||
{filteredQueryResultsSelector.map((icon) => {
|
||||
const IconComponent = icon.Icon;
|
||||
return (
|
||||
<div
|
||||
key={icon.pascal_name}
|
||||
onClick={() => setIconName(icon.pascal_name)}
|
||||
className={`cursor-pointer btn p-1 box-border bg-base-100 border-none w-full ${
|
||||
icon.pascal_name === iconName
|
||||
? "outline outline-1 outline-primary"
|
||||
: ""
|
||||
}`}
|
||||
>
|
||||
<IconComponent size={32} weight={weight} color={color} />
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default IconGrid;
|
||||
|
|
Ŝarĝante…
Reference in New Issue