Files
web/apps/scandic-web/components/TempDesignSystem/Form/Select/select.ts
Anton Gunnarsson 5a86cbaafe Merged in chore/update-eslint-configs (pull request #2812)
chore: Extend eslint configs from @typescript-eslint/recommended

* Change to typescript recommended in scandic-web

* Remove comment

* Change to recommended ts config in partner-sas

* Change to recommended ts lint config in booking-flow


Approved-by: Linus Flood
2025-09-17 07:55:11 +00:00

30 lines
810 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
// eslint-disable-next-line @typescript-eslint/no-explicit-any
optionsIcon?: ReactElement<any>
}
export interface SelectProps
extends Omit<
React.SelectHTMLAttributes<HTMLSelectElement>,
"name" | "onSelect" | "placeholder"
>,
Omit<ReactAriaSelectProps, "ref" | "value"> {
registerOptions?: RegisterOptions
}