import { Listbox } from '@headlessui/react' import styled from '@emotion/styled' import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/solid' const StyledListbox = styled(Listbox.Button)` border-left: 1px solid transparent; ` const TRADE_TYPES = ['Limit', 'Market'] const TradeType = ({ value, onChange, className = '' }) => { return (
{({ open }) => ( <>
{value} {open ? ( ) : ( )}
{open ? ( {TRADE_TYPES.map((type) => ( {({ selected }) => (
{type}
)}
))}
) : null} )}
) } export default TradeType