1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
--- import type { HTMLAttributes } from 'astro/types'; interface Props extends HTMLAttributes<'a'> { } const props = Astro.props; const className = [ 'hover:text-blue-500 underline decoration-[transparent] hover:decoration-blue-500 transition-colors', props.class, ].join(' '); --- <a class={className} {...props}> <slot /> </a>