next-enterprise/package/components/atoms/Icon.tsx
2024-09-30 15:17:38 -05:00

15 lines
No EOL
335 B
TypeScript

"use client"
import * as MUIIcons from "@mui/icons-material"
import React from "react"
interface IconProps {
name: keyof typeof MUIIcons
className?: string
}
const Icon: React.FC<IconProps> = ({ name, className }) => {
const IconComponent = MUIIcons[name]
return <IconComponent className={className} />
}
export default Icon