@nutui/nutui-react
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
42 lines (41 loc) • 1.05 kB
TypeScript
import { default as React } from 'react';
import { RadioGroupDirection, RadioGroupOption, RadioGroupPosition, RadioGroupShape } from './types';
export interface RadioGroupProps {
/**
* 当前选中项的标识符
* @default -
*/
value?: string | number
defaultValue?: string | number;
/**
* 文本所在的位置
* @default right
*/
labelPosition: RadioGroupPosition
/**
* 使用横纵方向
* @default vertical
*/
direction: RadioGroupDirection
/**
* 形状
* @default -
*/
shape?: RadioGroupShape
/**
* 是否禁用
* @default false
*/
disabled?: boolean
/**
* 配置 options 渲染单选按钮
* @default -
*/
options: RadioGroupOption[]
/**
* 值变化时触发
* @default -
*/
onChange: (value: string | number) => void
}
export declare const RadioGroup: React.ForwardRefExoticComponent<Partial<RadioGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;