mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
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:
parent
9663b24216
commit
7e209f0a51
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user