chore(SW-3145): Move DeprecatedSelect to design-system * Move DeprecatedSelect to design-system Approved-by: Linus Flood
29 lines
745 B
TypeScript
29 lines
745 B
TypeScript
import type { ReactElement } from "react"
|
|
import type { Key } from "react-aria-components"
|
|
import type { RegisterOptions } from "react-hook-form"
|
|
|
|
interface ReactAriaSelectProps
|
|
extends Omit<
|
|
React.SelectHTMLAttributes<HTMLSelectElement>,
|
|
"onSelect" | "value"
|
|
> {
|
|
defaultSelectedKey?: Key
|
|
items: { label: string; value: Key }[]
|
|
label: string
|
|
name: string
|
|
maxHeight?: number
|
|
showRadioButton?: boolean
|
|
discreet?: boolean
|
|
isNestedInModal?: boolean
|
|
optionsIcon?: ReactElement<any>
|
|
}
|
|
|
|
export interface SelectProps
|
|
extends Omit<
|
|
React.SelectHTMLAttributes<HTMLSelectElement>,
|
|
"name" | "onSelect" | "placeholder"
|
|
>,
|
|
Omit<ReactAriaSelectProps, "ref" | "value"> {
|
|
registerOptions?: RegisterOptions
|
|
}
|