Skip to content

Commit d91e5df

Browse files
ui: make buttons match dashboard UI (#1029)
1 parent fd597af commit d91e5df

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

src/components/Button/Button.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import clsx from "clsx";
2+
import styles from "./styles.module.css";
23

34
type ButtonType = {
45
href: string;
@@ -18,10 +19,10 @@ const Button: React.FC<ButtonType> = ({
1819
return (
1920
<a
2021
className={clsx(
21-
"py-2 px-6 rounded-full w-fit min-w-40 text-center hover:no-underline font-semibold font-head",
22+
"button py-2 px-6 rounded-full w-fit min-w-40 text-center hover:no-underline font-semibold font-head",
2223
variant === "primary"
23-
? "bg-primary text-white hover:bg-primaryDark"
24-
: "bg-transparent text-primary hover:bg-base-100 dark:hover:bg-base-800",
24+
? styles["button-primary"]
25+
: styles["button-secondary"],
2526
additionalClasses,
2627
)}
2728
href={href}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.button-primary {
2+
color: var(--text-contrast);
3+
background:
4+
linear-gradient(
5+
180deg,
6+
var(--action-primary),
7+
var(--button-primary-bottom) 100%
8+
),
9+
var(--action-primary);
10+
box-shadow:
11+
rgba(27, 40, 111, 0.2) 0px 2px 4px 0px,
12+
rgba(0, 0, 0, 0.1) 0px 0.5px 1px 0px,
13+
rgba(0, 0, 0, 0.1) 0px 0px 1px 0.5px,
14+
light-dark(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1)) 0px 0.75px
15+
1.5px 0.5px inset;
16+
17+
&:hover {
18+
color: var(--text-contrast);
19+
background: var(--action-primary);
20+
box-shadow:
21+
rgba(0, 0, 0, 0.1) 0px 0.5px 1px 0px,
22+
rgba(0, 0, 0, 0.1) 0px 0px 1px 0.5px,
23+
light-dark(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1)) 0px 0.75px
24+
1.5px 0.5px inset;
25+
}
26+
}
27+
28+
.button-secondary {
29+
color: var(--action-primary);
30+
background: rgb(from currentcolor r g b / 0.1);
31+
32+
&:hover {
33+
color: var(--text-primary);
34+
background: rgb(from currentcolor r g b / 0.15);
35+
}
36+
}

0 commit comments

Comments
 (0)