style(dropdownComponent): add dark mode support to dropdown component options and background color
This commit is contained in:
parent
45c04befe7
commit
6e2b4b01dc
1 changed files with 5 additions and 3 deletions
|
|
@ -41,14 +41,16 @@ export default function Dropdown({
|
||||||
leaveFrom="opacity-100"
|
leaveFrom="opacity-100"
|
||||||
leaveTo="opacity-0"
|
leaveTo="opacity-0"
|
||||||
>
|
>
|
||||||
<Listbox.Options className="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm">
|
<Listbox.Options className="absolute z-10 mt-1 max-h-60 w-full dark:bg-gray-800 overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm">
|
||||||
{options.map((option, id) => (
|
{options.map((option, id) => (
|
||||||
<Listbox.Option
|
<Listbox.Option
|
||||||
key={id}
|
key={id}
|
||||||
className={({ active }) =>
|
className={({ active }) =>
|
||||||
classNames(
|
classNames(
|
||||||
active ? "text-white bg-indigo-600" : "text-gray-900",
|
active
|
||||||
"relative cursor-default select-none py-2 pl-3 pr-9"
|
? "text-white bg-indigo-600 dark:bg-indigo-500"
|
||||||
|
: "text-gray-900",
|
||||||
|
"relative cursor-default select-none py-2 pl-3 pr-9 dark:text-gray-300 dark:bg-gray-800"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
value={option}
|
value={option}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue