🐛 Fix col span type to number | string

close #14324
This commit is contained in:
afc163 2019-01-23 00:36:15 +08:00 committed by 偏右
parent c4026c4cb5
commit 909b3b5235

View File

@ -6,26 +6,29 @@ import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
const objectOrNumber = PropTypes.oneOfType([PropTypes.object, PropTypes.number]);
// https://github.com/ant-design/ant-design/issues/14324
type ColSpanType = number | string;
export interface ColSize {
span?: number;
order?: number;
offset?: number;
push?: number;
pull?: number;
span?: ColSpanType;
order?: ColSpanType;
offset?: ColSpanType;
push?: ColSpanType;
pull?: ColSpanType;
}
export interface ColProps extends React.HTMLAttributes<HTMLDivElement> {
span?: number;
order?: number;
offset?: number;
push?: number;
pull?: number;
xs?: number | ColSize;
sm?: number | ColSize;
md?: number | ColSize;
lg?: number | ColSize;
xl?: number | ColSize;
xxl?: number | ColSize;
span?: ColSpanType;
order?: ColSpanType;
offset?: ColSpanType;
push?: ColSpanType;
pull?: ColSpanType;
xs?: ColSpanType | ColSize;
sm?: ColSpanType | ColSize;
md?: ColSpanType | ColSize;
lg?: ColSpanType | ColSize;
xl?: ColSpanType | ColSize;
xxl?: ColSpanType | ColSize;
prefixCls?: string;
}