UNPKG

@payfit/unity-components

Version:

25 lines (24 loc) 1.05 kB
import { default as React, ReactNode } from 'react'; import { ListBoxItemProps } from 'react-aria-components/ListBox'; /** * Props for the SelectListOption component. * @template TType - The type of the item this option represents */ export interface SelectListOptionProps<TType extends object> extends Omit<ListBoxItemProps<TType>, 'ref' | 'className' | 'style'> { /** * The content to display for this option. Typically a text label or rich content. */ children: ReactNode; /** * Prevents the option from being selected when set to `true`. Disabled options are visually dimmed and cannot receive focus or interaction. * @default false */ isDisabled?: boolean; /** * Supplementary text displayed below the main option label. Use this to provide additional context or description about the option. */ helperText?: string; } export declare const SelectListOption: <T extends object>(props: SelectListOptionProps<T> & { ref?: React.ForwardedRef<HTMLDivElement>; }) => React.JSX.Element;