import React, { useRef } from "react"; import { HiddenSelect, useSelect } from "@react-aria/select"; import { useButton } from "@react-aria/button"; import { useSelectState } from "@react-stately/select"; import { Popover } from "./Popover"; import { ListBox } from "./ListBox"; import styles from "./SelectInput.module.css"; import classNames from "classnames"; import { ReactComponent as ArrowDownIcon } from "./icons/ArrowDown.svg"; export function SelectInput(props) { const state = useSelectState(props); const ref = useRef(); const { labelProps, triggerProps, valueProps, menuProps } = useSelect( props, state, ref ); const { buttonProps } = useButton(triggerProps, ref); return (

{props.label}

{state.isOpen && ( )}
); }