25 lines
826 B
TypeScript
25 lines
826 B
TypeScript
|
|
import * as React from 'react';
|
||
|
|
import type { Breakpoint } from '../_util/responsiveObserver';
|
||
|
|
import type { LiteralUnion } from '../_util/type';
|
||
|
|
type ColSpanType = number | string;
|
||
|
|
type FlexType = number | LiteralUnion<'none' | 'auto'>;
|
||
|
|
export interface ColSize {
|
||
|
|
flex?: FlexType;
|
||
|
|
span?: ColSpanType;
|
||
|
|
order?: ColSpanType;
|
||
|
|
offset?: ColSpanType;
|
||
|
|
push?: ColSpanType;
|
||
|
|
pull?: ColSpanType;
|
||
|
|
}
|
||
|
|
export interface ColProps extends React.HTMLAttributes<HTMLDivElement>, Partial<Record<Breakpoint, ColSpanType | ColSize>> {
|
||
|
|
flex?: FlexType;
|
||
|
|
span?: ColSpanType;
|
||
|
|
order?: ColSpanType;
|
||
|
|
offset?: ColSpanType;
|
||
|
|
push?: ColSpanType;
|
||
|
|
pull?: ColSpanType;
|
||
|
|
prefixCls?: string;
|
||
|
|
}
|
||
|
|
declare const Col: React.ForwardRefExoticComponent<ColProps & React.RefAttributes<HTMLDivElement>>;
|
||
|
|
export default Col;
|