mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-30 16:17:41 +01:00
Remove forwardRef
This commit is contained in:
parent
0ee269c877
commit
ca695b12a1
1 changed files with 43 additions and 45 deletions
|
@ -14,8 +14,7 @@ interface DropdownProps {
|
||||||
options: Array<OptionItem>;
|
options: Array<OptionItem>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Dropdown = React.forwardRef<HTMLDivElement, DropdownProps>(
|
export function Dropdown(props: DropdownProps) {
|
||||||
(props: DropdownProps) => (
|
|
||||||
<div className="relative my-4 max-w-[18rem]">
|
<div className="relative my-4 max-w-[18rem]">
|
||||||
<Listbox value={props.selectedItem} onChange={props.setSelectedItem}>
|
<Listbox value={props.selectedItem} onChange={props.setSelectedItem}>
|
||||||
{({ open }) => (
|
{({ open }) => (
|
||||||
|
@ -56,6 +55,5 @@ export const Dropdown = React.forwardRef<HTMLDivElement, DropdownProps>(
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Listbox>
|
</Listbox>
|
||||||
</div>
|
</div>;
|
||||||
)
|
}
|
||||||
);
|
|
||||||
|
|
Loading…
Reference in a new issue