14 lines
367 B
TypeScript
Raw Normal View History

2024-10-30 22:25:36 +00:00
/* Copyright (C) 2024 Manuel Bustillo*/
2024-10-30 23:24:29 +01:00
import * as HeroIcon from '@heroicons/react/24/outline'
import { ComponentProps } from 'react'
type Props = {
name: keyof typeof HeroIcon
} & ComponentProps<typeof HeroIcon.AcademicCapIcon>
export const Icon = ({ name, ...props }: Props) => {
const IconComponent = HeroIcon[name]
return <IconComponent {...props} />
}