fix: add flex type to ColSize interface (#26578)

According to the API in the docs and based on my own usage, it's a valid value so let's make it official!
This commit is contained in:
Jonathan Gabaut 2020-09-03 19:50:36 -07:00 committed by GitHub
parent 9663b24216
commit 7e209f0a51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@ type ColSpanType = number | string;
type FlexType = number | 'none' | 'auto' | string; type FlexType = number | 'none' | 'auto' | string;
export interface ColSize { export interface ColSize {
flex?: FlexType;
span?: ColSpanType; span?: ColSpanType;
order?: ColSpanType; order?: ColSpanType;
offset?: ColSpanType; offset?: ColSpanType;
@ -17,6 +18,7 @@ export interface ColSize {
} }
export interface ColProps extends React.HTMLAttributes<HTMLDivElement> { export interface ColProps extends React.HTMLAttributes<HTMLDivElement> {
flex?: FlexType;
span?: ColSpanType; span?: ColSpanType;
order?: ColSpanType; order?: ColSpanType;
offset?: ColSpanType; offset?: ColSpanType;
@ -29,7 +31,6 @@ export interface ColProps extends React.HTMLAttributes<HTMLDivElement> {
xl?: ColSpanType | ColSize; xl?: ColSpanType | ColSize;
xxl?: ColSpanType | ColSize; xxl?: ColSpanType | ColSize;
prefixCls?: string; prefixCls?: string;
flex?: FlexType;
} }
function parseFlex(flex: FlexType): string { function parseFlex(flex: FlexType): string {