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:
@ -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>
|
||||
|
Reference in New Issue
Block a user