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:
2024-10-06 13:27:18 +02:00
parent ebd59fe40e
commit beefabb908
27 changed files with 656 additions and 135 deletions

View File

@ -1,12 +1,12 @@
---
interface Props {
href: string
class?: string
import type { LinkProps } from "@/types/props"
interface Props extends LinkProps {
noStyle?: boolean
}
const { href, class: clazz } = Astro.props
const { href, noStyle = false, class: clazz, ...props } = Astro.props
---
<a href={href} target="_blank" rel="noopener" class:list={["link", clazz]}>
<a href={href} target="_blank" rel="noopener" class:list={[noStyle ? "" : "link", clazz]} {...props}>
<slot />
</a>