File tree Expand file tree Collapse file tree 2 files changed +34
-48
lines changed Expand file tree Collapse file tree 2 files changed +34
-48
lines changed Original file line number Diff line number Diff line change 14
14
text-neutral-800
15
15
dark:text-neutral-200;
16
16
17
- & : not (.active ): hover {
18
- /* Apply hover background to the full item width */
19
- @apply bg-neutral-100
20
- dark:bg-neutral-900;
21
-
22
- /* Ensure text colors contrast with hover background */
23
- .label {
24
- @apply text-neutral-900
25
- dark:text-neutral-100;
26
- }
27
-
28
- .icon {
29
- @apply scale-110
30
- text-green-600
31
- dark:text-green-400;
32
- }
33
-
34
- .progressionIcon {
35
- @apply fill-green-200
36
- dark:fill-green-300;
37
- }
38
- }
39
-
40
17
.label {
41
18
@apply font-regular
42
19
flex
46
23
text-sm;
47
24
}
48
25
49
- .progressionIcon {
50
- @apply shrink-0
51
- fill-neutral-200
52
- stroke-white
53
- stroke-[4 ]
54
- dark:fill-neutral-800
55
- dark:stroke-neutral-950;
56
- }
57
-
58
26
.icon {
59
27
@apply size-3
60
28
text-neutral-500
61
29
dark:text-neutral-200;
62
30
}
63
31
64
32
& .progression {
33
+ & .active {
34
+ @apply text-neutral-900
35
+ dark:text-white;
36
+
37
+ .hexagonIcon {
38
+ @apply fill-green-500;
39
+ }
40
+ }
41
+
65
42
.label {
66
43
@apply p-1;
67
44
}
68
45
69
- /* On hover, use full-width background on the item (set above) */
70
- & : not (.active ): hover {
71
- @apply bg-neutral-100
72
- dark:bg-neutral-900;
46
+ .hexagonIcon {
47
+ @apply shrink-0
48
+ fill-neutral-200
49
+ stroke-white
50
+ stroke-[4 ]
51
+ dark:fill-neutral-800
52
+ dark:stroke-neutral-950;
73
53
}
54
+ }
74
55
75
- /* Avoid extra pill background on the label when hovering */
76
- & : not (.active ): hover .label {
77
- @apply rounded-none
78
- bg-transparent;
56
+ & : not (.active ): not (.progression ): hover {
57
+ /* Apply hover background to the full item width */
58
+ @apply bg-neutral-100
59
+ dark:bg-neutral-900;
60
+
61
+ /* Ensure text colors contrast with hover background */
62
+ .label {
63
+ @apply text-neutral-900
64
+ dark:text-neutral-100;
65
+ }
66
+
67
+ .icon {
68
+ @apply scale-110
69
+ text-green-600
70
+ dark:text-green-400;
79
71
}
80
72
}
81
73
82
- & .active {
74
+ & .active : not (. progression ) {
83
75
/* Full-width active background and readable text */
84
76
@apply bg-green-600
85
77
text-white;
86
78
87
- .progressionIcon {
88
- @apply fill-green-500;
89
- }
90
-
91
79
/* Remove pill background on the label; keep full-width bg on the item */
92
80
.label {
93
81
@apply rounded-none
Original file line number Diff line number Diff line change @@ -31,9 +31,7 @@ const SidebarItem: FC<SidebarItemProps> = ({
31
31
activeClassName = { styles . active }
32
32
{ ...props }
33
33
>
34
- { showProgressionIcons && (
35
- < ProgressionIcon className = { styles . progressionIcon } />
36
- ) }
34
+ { showProgressionIcons && < ProgressionIcon className = { styles . hexagonIcon } /> }
37
35
38
36
< div className = { styles . label } >
39
37
< span > { label } </ span >
You can’t perform that action at this time.
0 commit comments