y-taro-ui
Version:
基于taro的表单解决方案 & 基础组件
24 lines (23 loc) • 840 B
TypeScript
import React from 'react';
import './index.less';
export declare type RadioValueType = string | number;
export interface RadioOptionType {
id: RadioValueType;
name: React.ReactNode;
style?: React.CSSProperties;
disabled?: boolean;
className?: string;
}
export interface RadioProps {
disabled?: boolean;
options: RadioOptionType[];
value?: string | number;
onChange?: (value: RadioValueType, fieldId?: string) => void;
vlidate?(value: RadioValueType): boolean;
fieldId?: string;
direction?: 'column' | 'row';
justify?: 'flex-start' | 'flex-end' | 'space-between';
icon?: 'check-circle-filled' | 'check-circle-outlined' | 'radio-filled' | 'radio';
}
export declare const Radio: React.MemoExoticComponent<(props: RadioProps) => JSX.Element>;
export default Radio;