Fix types for Radio Group

pull/11421/head
Ed Moore 7 years ago committed by 偏右
parent 007c7d0ef7
commit cd5cbafdf0

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import shallowEqual from 'shallowequal';
import Radio from './radio';
import { RadioGroupProps, RadioGroupState, RadioChangeEvent } from './interface';
import { RadioGroupProps, RadioGroupState, RadioChangeEvent, RadioGroupButtonStyle } from './interface';
function getCheckedValue(children: React.ReactNode) {
let value = null;
@ -21,7 +21,7 @@ export default class RadioGroup extends React.Component<RadioGroupProps, RadioGr
static defaultProps = {
disabled: false,
prefixCls: 'ant-radio',
buttonStyle: 'outline',
buttonStyle: 'outline' as RadioGroupButtonStyle,
};
static childContextTypes = {

@ -2,6 +2,8 @@ import * as React from 'react';
import { AbstractCheckboxGroupProps } from '../checkbox/Group';
import { AbstractCheckboxProps } from '../checkbox/Checkbox';
export type RadioGroupButtonStyle = 'outline' | 'solid';
export interface RadioGroupProps extends AbstractCheckboxGroupProps {
defaultValue?: any;
value?: any;
@ -12,7 +14,7 @@ export interface RadioGroupProps extends AbstractCheckboxGroupProps {
name?: string;
children?: React.ReactNode;
id?: string;
buttonStyle?: 'outline' | 'solid';
buttonStyle?: RadioGroupButtonStyle;
}
export interface RadioGroupState {

Loading…
Cancel
Save