Skip to content

Commit

Permalink
fix: Fix selected option text being white on light mode
Browse files Browse the repository at this point in the history
  • Loading branch information
VampireChicken12 committed Nov 16, 2023
1 parent 95ad5e9 commit 2781492
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/Inputs/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,20 @@ const Select: React.FC<SelectProps> = ({ className, disabled, id, label, onChang
{selectedOption ? (
options.find((option) => option.value === selectedOption)?.element ? (
<div className="flex w-full items-center justify-between pr-4">
<span className={cn("text-white", disabledButtonClasses)}>{options.find((option) => option.value === selectedOption)?.label}</span>
<span className={cn("text-black dark:text-white", disabledButtonClasses)}>
{options.find((option) => option.value === selectedOption)?.label}
</span>
{options.find((option) => option.value === selectedOption)?.element}
</div>
) : (
<div className="flex w-full items-center justify-between pr-2">
<span className={cn("text-white", disabledButtonClasses)}>{options.find((option) => option.value === selectedOption)?.label}</span>
<span className={cn("text-black dark:text-white", disabledButtonClasses)}>
{options.find((option) => option.value === selectedOption)?.label}
</span>
</div>
)
) : (
<span className={cn("text-white", disabledButtonClasses)}>Select an option</span>
<span className={cn("text-black dark:text-white", disabledButtonClasses)}>Select an option</span>
)}
<Arrow rotation={isSelectVisible ? "up" : "down"} />
</button>
Expand Down

0 comments on commit 2781492

Please sign in to comment.