@yamada-ui/radio
Version:
Yamada UI radio component
62 lines (59 loc) • 1.91 kB
TypeScript
import { HTMLUIProps, ThemeProps, ComponentArgs } from '@yamada-ui/core';
import { ReactNode, InputHTMLAttributes, RefAttributes, ReactElement } from 'react';
import { RadioCardAddonProps } from './radio-card-addon.js';
import { RadioCardDescriptionProps } from './radio-card-description.js';
import { RadioCardLabelProps } from './radio-card-label.js';
import { UseRadioProps } from './use-radio.js';
import '@yamada-ui/form-control';
import '@yamada-ui/utils';
interface RadioCardOptions {
/**
* The addon of the radio card.
*/
addon?: ReactNode;
/**
* The body of the radio card.
*/
description?: ReactNode;
/**
* The label of the radio card.
*/
label?: ReactNode;
/**
* If `true`, the icon will be displayed.
*
* @default true
*/
withIcon?: boolean;
/**
* Props for the footer of the radio card.
*/
addonProps?: RadioCardAddonProps;
/**
* Props for the description of the radio card.
*/
descriptionProps?: RadioCardDescriptionProps;
/**
* Props for the icon of the radio card.
*/
iconProps?: HTMLUIProps;
/**
* Props for input element.
*/
inputProps?: InputHTMLAttributes<HTMLInputElement>;
/**
* Props for the label of the radio card.
*/
labelProps?: RadioCardLabelProps;
}
interface RadioCardProps<Y extends number | string = string> extends Omit<HTMLUIProps<"label">, keyof UseRadioProps>, ThemeProps<"RadioCard">, UseRadioProps<Y>, RadioCardOptions {
}
/**
* `RadioCard` is a component used for allowing users to select one option from multiple choices.
*
* @see Docs https://yamada-ui.com/components/forms/radio-card
*/
declare const RadioCard: {
<Y extends number | string = string>(props: RadioCardProps<Y> & RefAttributes<HTMLInputElement>): ReactElement;
} & ComponentArgs;
export { RadioCard, type RadioCardProps };