30 lines
587 B
TypeScript
30 lines
587 B
TypeScript
// import { type LucideIcon } from "lucide-react";
|
|
|
|
import {
|
|
AuthMenuIcon,
|
|
PersonalMenuIcon,
|
|
SystemIcon,
|
|
TaskMenuIcon,
|
|
} from "./icons/management"
|
|
|
|
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
|
|
}
|
|
})
|