From a09f531453202eaadf2269f82d6b4a38add82ae0 Mon Sep 17 00:00:00 2001 From: niko <644506165@qq.com> Date: Sun, 21 Jan 2018 01:03:00 +0800 Subject: [PATCH] add grid xxl to List fixed: #9019 (#9038) --- components/grid/col.tsx | 2 ++ components/list/Item.tsx | 2 ++ .../list/__tests__/__snapshots__/demo.test.js.snap | 12 ++++++------ components/list/demo/resposive.md | 2 +- components/list/index.tsx | 3 ++- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/components/grid/col.tsx b/components/grid/col.tsx index 7781c24393..3cb60341d7 100644 --- a/components/grid/col.tsx +++ b/components/grid/col.tsx @@ -25,6 +25,7 @@ export interface ColProps { md?: number | ColSize; lg?: number | ColSize; xl?: number | ColSize; + xxl?: number | ColSize; prefixCls?: string; style?: React.CSSProperties; } @@ -43,6 +44,7 @@ export default class Col extends React.Component { md: objectOrNumber, lg: objectOrNumber, xl: objectOrNumber, + xxl: objectOrNumber, }; render() { diff --git a/components/list/Item.tsx b/components/list/Item.tsx index 0bbb0ba15e..4751a84344 100644 --- a/components/list/Item.tsx +++ b/components/list/Item.tsx @@ -67,6 +67,7 @@ export default class Item extends React.Component { md: PropTypes.oneOf(GridColumns), lg: PropTypes.oneOf(GridColumns), xl: PropTypes.oneOf(GridColumns), + xxl: PropTypes.oneOf(GridColumns), }; static contextTypes = { @@ -131,6 +132,7 @@ export default class Item extends React.Component { md={getGrid(grid, 'md')} lg={getGrid(grid, 'lg')} xl={getGrid(grid, 'xl')} + xxl={getGrid(grid, 'xxl')} >
{extra && extraContent} diff --git a/components/list/__tests__/__snapshots__/demo.test.js.snap b/components/list/__tests__/__snapshots__/demo.test.js.snap index d4cb6f7c1f..e9f7d6415e 100644 --- a/components/list/__tests__/__snapshots__/demo.test.js.snap +++ b/components/list/__tests__/__snapshots__/demo.test.js.snap @@ -446,7 +446,7 @@ exports[`renders ./components/list/demo/resposive.md correctly 1`] = ` style="margin-left:-8px;margin-right:-8px" >
( diff --git a/components/list/index.tsx b/components/list/index.tsx index 09ca2ecb59..36e16a5a99 100644 --- a/components/list/index.tsx +++ b/components/list/index.tsx @@ -15,7 +15,7 @@ export { ListItemProps, ListItemMetaProps } from './Item'; export type ColumnCount = 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24; -export type ColumnType = 'gutter' | 'column' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'; +export type ColumnType = 'gutter' | 'column' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; export interface ListGridType { gutter?: number; @@ -25,6 +25,7 @@ export interface ListGridType { md?: ColumnCount; lg?: ColumnCount; xl?: ColumnCount; + xxl?: ColumnCount; } export type ListSize = 'small' | 'default' | 'large';