Skip to content

Commit

Permalink
Merge pull request #111 from abusix/ahq2-94-hailstorm-add-classname-t…
Browse files Browse the repository at this point in the history
…o-listbox-component

Add classname to listbox
  • Loading branch information
mnlfischer authored Feb 20, 2024
2 parents 75f1ac0 + 8f51baa commit 28adf4d
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 28adf4d

Please sign in to comment.