Skip to content

Commit

Permalink
refactor: some minor juice listbox change
Browse files Browse the repository at this point in the history
  • Loading branch information
aeolianeth committed Feb 5, 2025
1 parent 85497fa commit 78b27b6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/components/inputs/JuiceListbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function JuiceListbox<T>(props: JuiceListboxProps<T>) {
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
<Listbox.Options className="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-smoke-300 bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:border-slate-300 dark:bg-slate-800 sm:text-sm">
<Listbox.Options className="absolute z-10 mt-1 max-h-60 rounded-lg border border-smoke-300 bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:border-slate-300 dark:bg-slate-800 sm:text-sm">
{options.map((option, optionIdx) => (
<Listbox.Option
key={optionIdx}
Expand All @@ -63,13 +63,11 @@ export function JuiceListbox<T>(props: JuiceListboxProps<T>) {
>
{({ selected }) => (
<>
<span
className={`block truncate ${
selected ? 'font-bold' : 'font-normal'
}`}
<div
className={`${selected ? 'font-bold' : 'font-normal'}`}
>
{option.label}
</span>
</div>
</>
)}
</Listbox.Option>
Expand Down

0 comments on commit 78b27b6

Please sign in to comment.