mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 03:59:01 +08:00
Improve Grid and Layout type definition
This commit is contained in:
parent
26934b37c8
commit
518c424ca4
@ -13,8 +13,7 @@ export interface ColSize {
|
||||
pull?: number;
|
||||
}
|
||||
|
||||
export interface ColProps {
|
||||
className?: string;
|
||||
export interface ColProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
span?: number;
|
||||
order?: number;
|
||||
offset?: number;
|
||||
@ -27,7 +26,6 @@ export interface ColProps {
|
||||
xl?: number | ColSize;
|
||||
xxl?: number | ColSize;
|
||||
prefixCls?: string;
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
export default class Col extends React.Component<ColProps, {}> {
|
||||
|
@ -31,13 +31,11 @@ export type BreakpointMap = {
|
||||
xxl?: string
|
||||
};
|
||||
|
||||
export interface RowProps {
|
||||
className?: string;
|
||||
export interface RowProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
gutter?: number | BreakpointMap;
|
||||
type?: 'flex';
|
||||
align?: 'top' | 'middle' | 'bottom';
|
||||
justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between';
|
||||
style?: React.CSSProperties;
|
||||
prefixCls?: string;
|
||||
}
|
||||
|
||||
|
@ -31,10 +31,8 @@ const dimensionMap = {
|
||||
|
||||
export type CollapseType = 'clickTrigger' | 'responsive';
|
||||
|
||||
export interface SiderProps {
|
||||
style?: React.CSSProperties;
|
||||
export interface SiderProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
prefixCls?: string;
|
||||
className?: string;
|
||||
collapsible?: boolean;
|
||||
collapsed?: boolean;
|
||||
defaultCollapsed?: boolean;
|
||||
|
@ -3,10 +3,8 @@ import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import { SiderProps } from './Sider';
|
||||
|
||||
export interface BasicProps {
|
||||
style?: React.CSSProperties;
|
||||
export interface BasicProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
prefixCls?: string;
|
||||
className?: string;
|
||||
hasSider?: boolean;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user