mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-14 21:26:08 +01:00
feat: links
This commit is contained in:
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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user