feat: links

This commit is contained in:
TrèsAbhi committed 2026-01-10 13:19:59 -06:00
1 parent 01a58f9aa8
commit 1117dcb935
6 files changed
+55 -5

No files matched your search

@@ -0,0 +1,14 @@
.link {
color: var(--accent-11);
text-decoration-color: currentColor;
&[data-underline="hover"],
&[data-underline="never"] {
text-decoration: none;
}
&[data-underline="hover"]:hover,
&[data-underline="hover"]:focus {
text-decoration: underline;
}
}
@@ -0,0 +1,17 @@
import type { ComponentProps } from "react";
import { classNames } from "../../core/ui/classNames";
import "./index.css";
export interface LinkProps extends ComponentProps<"a"> {
underline?: "always" | "hover" | "never";
}
export function Link({ className, underline = "always", ...props }: LinkProps) {
return (
<a
className={classNames("link", className)}
{...props}
data-underline={underline}
/>
);
}