Icons using npm package instead of svgs. Props and types. Signed-off-by: Martin Berg Alstad <git@martials.no>
13 lines
325 B
Plaintext
13 lines
325 B
Plaintext
---
|
|
import type { PajamasIcon } from "@/types/icons"
|
|
import type { ComponentProps } from "@/types/props"
|
|
import { Icon } from "astro-icon/components"
|
|
interface Props extends ComponentProps {
|
|
name: PajamasIcon
|
|
}
|
|
|
|
const { name, class: clazz, ...props } = Astro.props
|
|
---
|
|
|
|
<Icon name={name} class:list={[clazz]} {...props} />
|