Skip to content

Commit 78de796

Browse files
style theme picker
1 parent 08a50e4 commit 78de796

File tree

3 files changed

+53
-8
lines changed

3 files changed

+53
-8
lines changed

src/features/common/components/headers/header/header.module.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,13 @@
101101
border-radius: 0.125rem;
102102
}
103103
}
104+
105+
.actions {
106+
display: flex;
107+
gap: .5rem;
108+
109+
@media #{$breakpoint-dimension-md} {
110+
gap: 1rem;
111+
margin-right: 1.5rem;
112+
}
113+
}

src/features/common/components/theme-picker/theme-picker.component.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ export const ThemePickerComponent: React.FC<ThemePickerComponentProps> = ({
2929
<div
3030
key={option.code}
3131
className={styles.option}
32-
data-active={
33-
option.code === selectedOptionCode
34-
? PicketListItemStateValues.ACTIVE
35-
: PicketListItemStateValues.INACTIVE
36-
}
32+
data-active={selectedOptionCode === option.code}
3733
title={option.label}
3834
onClick={async () => {
3935
console.log(option.label)
Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,50 @@
11
.container {
2-
2+
display: flex;
3+
align-items: center;
4+
justify-content: center;
35
}
46

57
.wrapper {
6-
8+
display: flex;
9+
background-color: var(--color_bg_app_bar);
10+
border: 1px solid var(--color_border_default);
11+
border-radius: 9999px;
12+
overflow: hidden;
13+
width: -moz-fit-content;
14+
width: fit-content;
15+
padding: 0.25rem;
16+
gap: 0.125rem;
717
}
818

919
.option {
20+
display: flex;
21+
align-items: center;
22+
justify-content: center;
23+
color: var(--color_fg_default);
24+
cursor: pointer;
25+
padding: 0.25rem;
26+
position: relative;
27+
transition: all 0.2s ease;
28+
border-radius: 9999px;
29+
width: 2.5rem;
30+
height: 1.75rem;
31+
32+
&[data-active="true"] {
33+
background-color: var(--color_bg_layer);
34+
color: var(--color_fg_bold);
35+
box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
36+
}
37+
}
38+
39+
.option__icon {
40+
display: flex;
41+
align-items: center;
42+
justify-content: center;
43+
height: 100%;
44+
width: 100%;
1045

11-
}
46+
svg {
47+
height: 1rem;
48+
width: 1rem;
49+
}
50+
}

0 commit comments

Comments
 (0)