UNPKG

@nutui/nutui-react

Version:

京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序

55 lines (54 loc) 1.38 kB
import { default as React, FunctionComponent } from 'react'; import { default as RadioGroup } from '../radiogroup'; import { BasicComponent } from '../../utils/typings'; import { RadioPosition, RadioShape } from './types'; export interface RadioProps extends BasicComponent { /** * 是否禁用选择 * @default false */ disabled: boolean /** * 指定当前是否选中 * @default - */ checked: boolean /** * 初始是否选中 * @default - */ defaultChecked: boolean /** * 形状 * @default round */ shape: RadioShape /** * 文本所在的位置 * @default right */ labelPosition: RadioPosition /** * <a href="#/icon">图标名称</a>,选中前(建议和activeIcon一起修改) * @default 'CheckNormal' */ icon: React.ReactNode /** * <a href="#/icon">图标名称</a>,选中后(建议和icon一起修改) * @default 'CheckChecked' */ activeIcon: React.ReactNode /** * 携带的标识值,用于 Group 模式 * @default - */ value: string | number /** * 选中态变化时触发 * @default - */ onChange: (checked: boolean) => void } export declare const Radio: FunctionComponent<Partial<RadioProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>> & { Group: typeof RadioGroup; };