Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijk4poor committed Nov 20, 2024
1 parent c23b54b commit bfd7427
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/Link.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ type Props = {
href: string;
external?: boolean;
underline?: boolean;
className?: string;
class?: string;
}
const { href, external, underline = true, ...rest } = Astro.props;
const { href, external, underline = true, className, class: classList } = Astro.props;
const classes = className || classList;
---

<a
href={href}
target={ external ? "_blank" : "_self" }
class={cn("inline-block decoration-black/15 dark:decoration-white/30 hover:decoration-black/25 hover:dark:decoration-white/50 text-current hover:text-black hover:dark:text-white transition-colors duration-300 ease-in-out", underline && "underline underline-offset-2")}
class={cn("inline-block decoration-black/15 dark:decoration-white/30 hover:decoration-black/25 hover:dark:decoration-white/50 text-current hover:text-black hover:dark:text-white transition-colors duration-300 ease-in-out", underline && "underline underline-offset-2", classes)}
{...rest}>
<slot/>
</a>

0 comments on commit bfd7427

Please sign in to comment.