Skip to content

Commit e684d41

Browse files
authored
Merge pull request #36 from ryjac/main
fix: 💚 Dark Mode Support
2 parents ffac2c7 + 03b6fb8 commit e684d41

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/components/TagsInput.module.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
transition: none !important;
55
}
66

7+
.input {
8+
color: var(--input-fg-color) !important;
9+
}
10+
711
.control:hover {
812
border-color: var(--card-border-color) !important;
913
}
@@ -15,6 +19,7 @@
1519

1620
.option {
1721
background-color: var(--card-bg-color) !important;
22+
color: var(--input-fg-color) !important;
1823
}
1924

2025
.option:hover {
@@ -27,7 +32,7 @@
2732

2833
.placeholder,
2934
.singleValue {
30-
color: var(--card-fg-color) !important;
35+
color: var(--input-fg-color) !important;
3136
}
3237

3338
.multiValue {

src/components/TagsInput.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,15 @@ export const TagsInput = forwardRef<StateManagedSelect, TagsInputProps>(
225225
styles: {
226226
menu: (base) => ({
227227
...base,
228-
zIndex: 11, // Adjusted dropdown menu z-index to prevent overlap with background items
228+
zIndex: 15, // Adjusted dropdown menu z-index to prevent overlap with background items
229229
}),
230230
},
231231
classNames: prefersDark
232-
? {
232+
? undefined
233+
: {
233234
container: () => styles.container,
234235
control: () => styles.control,
236+
input: () => styles.input,
235237
menu: () => styles.menu,
236238
option: () => styles.option,
237239
indicatorSeparator: () => styles.indicatorSeparator,
@@ -240,8 +242,7 @@ export const TagsInput = forwardRef<StateManagedSelect, TagsInputProps>(
240242
multiValue: () => styles.multiValue,
241243
multiValueLabel: () => styles.multiValueLabel,
242244
multiValueRemove: () => styles.multiValueRemove,
243-
}
244-
: undefined,
245+
},
245246
...reactSelectOptions,
246247
} as SelectProps
247248

0 commit comments

Comments
 (0)