UNPKG

@yamada-ui/radio

Version:

Yamada UI radio component

37 lines (34 loc) 1.16 kB
import { HTMLUIProps, ThemeProps, ComponentArgs } from '@yamada-ui/core'; import { ReactNode, InputHTMLAttributes, RefAttributes, ReactElement } from 'react'; import { UseRadioProps } from './use-radio.js'; import '@yamada-ui/form-control'; import '@yamada-ui/utils'; interface RadioOptions { /** * The label of the radio. */ label?: ReactNode; /** * Props for icon element. */ iconProps?: HTMLUIProps<"span">; /** * Props for input element. */ inputProps?: InputHTMLAttributes<HTMLInputElement>; /** * Props for label element. */ labelProps?: HTMLUIProps<"span">; } interface RadioProps<Y extends number | string = string> extends Omit<HTMLUIProps<"label">, keyof UseRadioProps>, ThemeProps<"Radio">, UseRadioProps<Y>, RadioOptions { } /** * `Radio` is a component used for allowing users to select one option from multiple choices. * * @see Docs https://yamada-ui.com/components/forms/radio */ declare const Radio: { <Y extends number | string = string>(props: RadioProps<Y> & RefAttributes<HTMLInputElement>): ReactElement; } & ComponentArgs; export { Radio, type RadioProps };