test-nut-ui
Version:
<p align="center"> <img alt="logo" src="https://img11.360buyimg.com/imagetools/jfs/t1/211965/25/7152/22022/61b16785E433119bb/aa41d7a9f7e823f3.png" width="150" style="margin-bottom: 10px;"> </p>
46 lines (45 loc) • 1.09 kB
TypeScript
import React from 'react';
import { RadioGroupOptionType } from './type';
type Position = 'left' | 'right';
type Direction = 'horizontal' | 'vertical';
type RadioSize = 'middle' | 'small';
export interface RadioGroupProps {
/**
* 当前选中项的标识符
* @default -
*/
value?: string | number
defaultValue?: string | number;
/**
* 文本所在的位置
* @default right
*/
labelPosition: Position
/**
* 使用横纵方向
* @default vertical
*/
direction: Direction
/**
* 是否禁用
* @default false
*/
disabled?: boolean
/**
* 配置 options 渲染单选按钮
* @default -
*/
options: RadioGroupOptionType[]
/**
* 尺寸
* @default middle
*/
size: RadioSize
/**
* 值变化时触发
* @default -
*/
onChange: (value: string | number) => void
}
export declare const RadioGroup: React.ForwardRefExoticComponent<Partial<RadioGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;
export {};