Links page.
Icons using npm package instead of svgs. Props and types. Signed-off-by: Martin Berg Alstad <git@martials.no>
This commit is contained in:
10
src/components/icons/Gitea.astro
Normal file
10
src/components/icons/Gitea.astro
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
import PajamasIcon from "./PajamasIcon.astro"
|
||||
interface Props {
|
||||
class?: string
|
||||
}
|
||||
|
||||
const { class: clazz } = Astro.props
|
||||
---
|
||||
|
||||
<PajamasIcon name="pajamas:gitea" class={clazz}></PajamasIcon>
|
12
src/components/icons/PajamasIcon.astro
Normal file
12
src/components/icons/PajamasIcon.astro
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
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} />
|
Reference in New Issue
Block a user