feat: 新增菜单图标, 搜索组件

This commit is contained in:
wenhua
2023-11-10 14:31:25 +08:00
parent 2eeaf31cf4
commit ff24a5cec9
52 changed files with 11561 additions and 34 deletions

View File

@@ -0,0 +1,19 @@
import { useMemo } from "react"
interface IMenuIconProps {
prefix?: string
name: string
color?: string,
size?: number | string
}
export default function Menuicon(props: IMenuIconProps) {
const { prefix = 'icon', name, color, size = 16 } = props
const symbolId = useMemo(() => `#${prefix}-${name}`, [prefix, name])
return (
<span className="anticon">
<svg aria-hidden="true" width={size} height={size} fill={color} >
<use href={symbolId} fill={color} />
</svg>
</span>
)
}