diff --git a/components/grid/col.tsx b/components/grid/col.tsx index 8b7261e9be..ececcf2a96 100644 --- a/components/grid/col.tsx +++ b/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 { - 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; }