Update Dropdown.tsx

This commit is contained in:
James Hawkins 2022-12-18 19:28:58 +00:00 committed by GitHub
parent 4846ec53b2
commit 459223a030
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@ interface DropdownProps {
} }
export function Dropdown(props: DropdownProps) { export function Dropdown(props: DropdownProps) {
return (
<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 }) => (
@ -55,5 +56,6 @@ export function Dropdown(props: DropdownProps) {
</> </>
)} )}
</Listbox> </Listbox>
</div>; </div>
)
} }