feat: typography, toc
This commit is contained in:
parent
ea68d4f02f
commit
8fe228e243
16 changed files with 194 additions and 311 deletions
src/components
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue