feat: 基础搭建框架完成

This commit is contained in:
landaiqing
2024-04-12 23:31:22 +08:00
parent 18d15ddd17
commit 81524f7edd
17 changed files with 3340 additions and 196 deletions

View File

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