feat: add a textDecoration variant to links

This commit is contained in:
Chuma McPhoy
2024-07-08 13:25:00 +02:00
parent 57b424819a
commit 22647710c9
5 changed files with 16 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ export default function Link({
color,
href,
partialMatch = false,
textDecoration,
size,
prefetch,
variant,
@@ -24,6 +25,7 @@ export default function Link({
const classNames = linkVariants({
active: isActive,
className,
textDecoration,
color,
size,
variant,

View File

@@ -1,7 +1,14 @@
.link {
}
.noDecoration {
text-decoration: none;
}
.underline {
text-decoration: underline;
}
.default {
font-family: var(--typography-Body-Regular-fontFamily);
}

View File

@@ -19,6 +19,10 @@ export const linkVariants = cva(styles.link, {
small: styles.small,
regular: styles.regular,
},
textDecoration: {
none: styles.noDecoration,
underline: styles.underline,
},
variant: {
breadcrumb: styles.breadcrumb,
default: styles.default,
@@ -32,6 +36,7 @@ export const linkVariants = cva(styles.link, {
defaultVariants: {
color: "black",
variant: "default",
textDecoration: "none",
},
compoundVariants: [
{