Files
labelimage/components/layout/components/ClientIcon.tsx
2026-03-10 17:06:22 +08:00

30 lines
583 B
TypeScript

// import { type LucideIcon } from "lucide-react";
import {
AuthMenuIcon,
PersonalMenuIcon,
SystemIcon,
TaskMenuIcon,
} from "./icons/custom"
import React from "react"
export const ClientIcon = React.forwardRef<
HTMLDivElement,
React.ComponentProps<"button"> & {
icon?: string
}
>(({ icon, ...props }, _ref) => {
if (icon) {
const IconComponent = {
SystemIcon,
PersonalMenuIcon,
TaskMenuIcon,
AuthMenuIcon,
}[icon]
return IconComponent ? <IconComponent style={{ ...props.style }} /> : null
} else {
return null
}
})