1
Fork 0

feat: typography, toc

This commit is contained in:
enscribe 2024-09-10 16:41:01 -07:00
parent ea68d4f02f
commit 8fe228e243
No known key found for this signature in database
GPG key ID: 9BBD5C4114E25322
16 changed files with 194 additions and 311 deletions
src/components

View file

@ -4,22 +4,22 @@ import { cn } from '@lib/utils'
type Props = {
href: string
external?: boolean
underline?: boolean
group?: boolean
class?: string
'data-heading'?: string
}
const { href, external, underline = true, group = false, ...rest } = Astro.props
const { href, external, class: className, 'data-heading': dataHeading, ...rest } = Astro.props
---
<a
href={href}
target={external ? '_blank' : '_self'}
class={cn(
'inline-block transition-colors duration-300 ease-in-out',
underline && 'underline underline-offset-[3px]',
group && 'group',
'inline-block transition-colors duration-300 ease-in-out hover:underline underline-offset-[3px]',
className
)}
data-heading={dataHeading}
{...rest}
>
<slot />
</a>
</a>