Skip to content

Commit 3829ef1

Browse files
committed
refactor: add shadow-brutal class & remove unused cn utility
1 parent 289acfe commit 3829ef1

File tree

7 files changed

+10
-16
lines changed

7 files changed

+10
-16
lines changed

js/react/lib/components/dropdown-tree/dropdown-tree.subject.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { ArrowDown } from "@/icons";
33
import { Badge } from "../badge";
44
import { Level } from "../level";
55
import { TopicElement } from "./dropdown-tree.types";
6-
import { cn } from "@/utils/tw-merge";
76
import { Radio } from "../radio";
87

98
type SubjectProps = PropsWithChildren &
@@ -17,7 +16,7 @@ export const DropdownTreeSubject = ({
1716
...rest
1817
}: SubjectProps) => {
1918
return (
20-
<details className={cn(["rustlanges-dropdown-tree-subject"])}>
19+
<details className="rustlanges-dropdown-tree-subject">
2120
<summary>
2221
<Badge type="text" variant={state} />
2322
<Level as="span" variant={level} />

js/react/showcase/styles.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,3 @@
44
html {
55
background: var(--color-gray-300);
66
}
7-
8-
@utility shadow-brutal {
9-
box-shadow: 2px 2px 0px #000;
10-
}

styles/components/button.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
}
5050

5151
.rustlanges-button--icon {
52-
@apply p-0! size-10 aspect-square rounded-full border;
52+
@apply p-0! aspect-square size-10 rounded-full border;
5353
@apply bg-light border-black text-black;
5454

5555
@variant hover {

styles/components/dropdown-tree-end.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@layer component {
22
.dropdown-tree-end {
3-
box-shadow: 2px 2px 0px 0px #000000;
4-
@apply grid h-fit w-full rounded-xl border border-black px-4 py-2.5 text-left;
3+
@apply shadow-brutal grid h-fit w-full rounded-xl border border-black px-4 py-2.5 text-left;
54
@apply bg-secondary-50 text-neutral-950;
65
@apply dark:bg-secondary-950 dark:text-neutral-50;
76

styles/components/dropdown-tree-start.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,13 @@
2222
}
2323

2424
.rustlanges-dropdown-tree-start--extended {
25-
box-shadow: 2px 2px 0px 0px #000000;
26-
box-sizing: content-box;
27-
@apply rounded-xl border border-black;
25+
@apply shadow-brutal rounded-xl border border-black;
2826
@apply dark:bg-secondary-950 bg-secondary-50;
2927
}
3028

3129
.rustlanges-dropdown-tree-start--default {
3230
& > summary {
33-
box-shadow: 2px 2px 0px 0px #000000;
34-
@apply mb-4 gap-4 rounded-2xl border border-black;
31+
@apply shadow-brutal mb-4 gap-4 rounded-2xl border border-black;
3532
@apply dark:bg-secondary-950 bg-secondary-50;
3633
}
3734

styles/components/dropdown-tree-subject.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@layer component {
22
.rustlanges-dropdown-tree-subject {
3-
box-shadow: 2px 2px 0px 0px #000000;
4-
@apply relative ml-6 flex items-center rounded-xl border border-black;
3+
@apply shadow-brutal relative ml-6 flex items-center rounded-xl border border-black;
54
@apply bg-light;
65
@apply dark:bg-dark;
76

styles/utilities/shadow.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
box-shadow: 2px 2px 0 0 --value(--color- *);
55
}
66
}
7+
8+
@utility shadow-brutal {
9+
box-shadow: 2px 2px 0 0 #000000;
10+
}

0 commit comments

Comments
 (0)