1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-23 15:07:43 +01:00
smov/src/components/Icon.tsx

16 lines
558 B
TypeScript
Raw Normal View History

2022-02-07 23:22:35 +01:00
export enum Icons {
SEARCH = "search",
}
export interface IconProps {
icon: Icons;
}
const iconList = {
search: `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>`,
}
export function Icon(props: IconProps) {
return <span dangerouslySetInnerHTML={{ __html: iconList[props.icon] }} />;
}