UNPKG

@commercetools-uikit/radio-input

Version:

A RadioInput represents a group of options where only one option can be selected at a time.

28 lines (27 loc) 984 B
import { type ChangeEventHandler, type FocusEventHandler, type ReactElement, type ReactNode } from 'react'; type TComponents = { wrapper?: (children: ReactElement) => ReactElement; }; export type TOptionProps = { value: string | boolean; children: ReactNode; components?: TComponents; additionalContent?: ReactNode; id?: string; name?: string; isChecked?: boolean; isDisabled?: boolean; isReadOnly?: boolean; hasError?: boolean; hasWarning?: boolean; onChange?: ChangeEventHandler<HTMLInputElement>; onFocus?: FocusEventHandler<HTMLLabelElement>; onBlur?: FocusEventHandler<HTMLLabelElement>; isHovered?: boolean; }; export type TStylesProps = Pick<TOptionProps, 'isDisabled' | 'hasError' | 'hasWarning' | 'isHovered' | 'isReadOnly' | 'isChecked'>; declare const Option: { ({ components, ...props }: TOptionProps): import("@emotion/react/jsx-runtime").JSX.Element; displayName: string; }; export default Option;