This commit is contained in:
parent
6f7b821c8b
commit
3a5b0bdcbc
162 changed files with 15801 additions and 224 deletions
32
FRONT/DEV/src/const/menus/sideBar/icons.tsx
Normal file
32
FRONT/DEV/src/const/menus/sideBar/icons.tsx
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import React from "react"
|
||||
import { toolBarNames } from "./names"
|
||||
import { useTheme } from "styled-components"
|
||||
import { Icon } from '@iconify/react';
|
||||
|
||||
import desktop from '@iconify/icons-ic/baseline-menu';
|
||||
|
||||
export const ICONS = {
|
||||
[toolBarNames[1]]: desktop,
|
||||
} as const
|
||||
|
||||
|
||||
type IconName = keyof typeof ICONS
|
||||
|
||||
interface IconsProps {
|
||||
name: IconName,
|
||||
width?: string
|
||||
height?: string
|
||||
setColor?: string
|
||||
}
|
||||
|
||||
export const IconComponent = ({ name, width = "24", height = "24", setColor}: IconsProps) => {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<Icon
|
||||
icon={ICONS[name]}
|
||||
width={width}
|
||||
height={height}
|
||||
color={setColor || theme.textColor}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue