Browse Source

🐛 Fix col span type to number | string

close #14324
pull/14507/head
afc163 6 years ago
committed by 偏右
parent
commit
909b3b5235
  1. 35
      components/grid/col.tsx

35
components/grid/col.tsx

@ -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;
}

Loading…
Cancel
Save