import { useState, Fragment } from "react"; import { Listbox, Transition } from "@headlessui/react"; import { BenchmarkNumberOfModules } from "./PackBenchmarks"; export function PackDropdown({ onOptionSelected, }: { onOptionSelected: (option: BenchmarkNumberOfModules) => void; }) { const [selectedOption, setSelectedOption] = useState("1000"); const onSelect = (option: BenchmarkNumberOfModules) => { onOptionSelected(option); setSelectedOption(option); }; return (
{Number(selectedOption).toLocaleString()} `relative cursor-default select-none py-1 text-sm pl-3 text-gray-400 ${ active ? "bg-gray-800 text-gray-100" : "text-gray-900" }` } > 1000 `relative cursor-default select-none py-1 text-sm pl-3 text-gray-400 ${ active ? "bg-gray-800 text-gray-100" : "text-gray-900" }` } value="5000" > 5000 `relative cursor-default select-none py-1 text-sm pl-3 text-gray-400 ${ active ? "bg-gray-800 text-gray-100" : "text-gray-900" }` } value="10000" > 10000 `relative cursor-default select-none py-1 text-sm pl-3 text-gray-400 ${ active ? "bg-gray-800 text-gray-100" : "text-gray-900" }` } value="30000" > 30000
); } function BenchmarkOption({ value, onSelect, }: { value: BenchmarkNumberOfModules; onSelect: (value: string) => void; }) { return (
onSelect(value)} >

{Number(value).toLocaleString()}

); } function Arrow() { return ( ); }