Skip to content

Commit

Permalink
fix: add className prop to Listbox component
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlfischer committed Feb 16, 2024
1 parent 75f1ac0 commit 8f51baa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/form-field/listbox/listbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ export interface ListboxProps<TValue> {
children: React.ReactNode;
value: TValue;
onChange: (value: TValue) => void;
className?: string;
}

const Listbox = <TValue,>({ children, value, onChange }: ListboxProps<TValue>) => {
const Listbox = <TValue,>({ children, value, onChange, className }: ListboxProps<TValue>) => {
return (
<HeadlessListbox value={value} onChange={onChange}>
<div className={classNames("relative w-full", formFieldGroupStyles)}>{children}</div>
<div className={classNames("relative w-full", formFieldGroupStyles, className)}>
{children}
</div>
</HeadlessListbox>
);
};
Expand Down

0 comments on commit 8f51baa

Please sign in to comment.