feat: add more generic Select component

This commit is contained in:
Arvid Norlin
2024-05-24 14:04:54 +02:00
parent 675228e4e9
commit 653cccaddb
4 changed files with 169 additions and 45 deletions
@@ -0,0 +1,11 @@
import type { Key } from "react-aria-components"
export interface SelectProps
extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "onSelect"> {
items: { label: string; value: Key }[]
label: string
name: string
onSelect: (key: Key) => void
placeholder?: string
defaultSelectedKey: Key
}