1 | import * as React from 'react';
|
2 | import { AbstractCheckboxGroupProps } from '../checkbox/Group';
|
3 | import { AbstractCheckboxProps } from '../checkbox/Checkbox';
|
4 | import { SizeType } from '../config-provider/SizeContext';
|
5 | export declare type RadioGroupButtonStyle = 'outline' | 'solid';
|
6 | export declare type RadioGroupOptionType = 'default' | 'button';
|
7 | export interface RadioGroupProps extends AbstractCheckboxGroupProps {
|
8 | defaultValue?: any;
|
9 | value?: any;
|
10 | onChange?: (e: RadioChangeEvent) => void;
|
11 | size?: SizeType;
|
12 | onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
13 | onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
|
14 | name?: string;
|
15 | children?: React.ReactNode;
|
16 | id?: string;
|
17 | optionType?: RadioGroupOptionType;
|
18 | buttonStyle?: RadioGroupButtonStyle;
|
19 | }
|
20 | export interface RadioGroupContextProps {
|
21 | onChange: (e: RadioChangeEvent) => void;
|
22 | value: any;
|
23 | disabled?: boolean;
|
24 | name?: string;
|
25 | }
|
26 | export declare type RadioProps = AbstractCheckboxProps<RadioChangeEvent>;
|
27 | export interface RadioChangeEventTarget extends RadioProps {
|
28 | checked: boolean;
|
29 | }
|
30 | export interface RadioChangeEvent {
|
31 | target: RadioChangeEventTarget;
|
32 | stopPropagation: () => void;
|
33 | preventDefault: () => void;
|
34 | nativeEvent: MouseEvent;
|
35 | }
|