diff --git a/packages/material-ui/src/Grid/Grid.d.ts b/packages/material-ui/src/Grid/Grid.d.ts index 8d81d7b25167bd..481c9f0506cad0 100644 --- a/packages/material-ui/src/Grid/Grid.d.ts +++ b/packages/material-ui/src/Grid/Grid.d.ts @@ -1,7 +1,6 @@ import * as React from 'react'; -import { Omit } from '@material-ui/types'; -import { StandardProps } from '..'; import { Breakpoint } from '../styles/createBreakpoints'; +import { OverridableComponent, SimplifiedPropsOf } from '../OverridableComponent'; export type GridItemsAlignment = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'; @@ -29,22 +28,7 @@ export type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse'; export type GridSize = 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; -export interface GridProps - extends StandardProps< - React.HTMLAttributes & Partial>, - GridClassKey - > { - alignContent?: GridContentAlignment; - alignItems?: GridItemsAlignment; - component?: string | React.ComponentType>; - container?: boolean; - direction?: GridDirection; - item?: boolean; - justify?: GridJustification; - spacing?: GridSpacing; - wrap?: GridWrap; - zeroMinWidth?: boolean; -} +export type GridProps = SimplifiedPropsOf; export type GridClassKey = | 'container' @@ -92,7 +76,21 @@ export type GridClassKey = | 'grid-xs-11' | 'grid-xs-12'; -declare const Grid: React.ComponentType; +declare const Grid: OverridableComponent<{ + props: Partial> & { + alignContent?: GridContentAlignment; + alignItems?: GridItemsAlignment; + container?: boolean; + direction?: GridDirection; + item?: boolean; + justify?: GridJustification; + spacing?: GridSpacing; + wrap?: GridWrap; + zeroMinWidth?: boolean; + }; + defaultComponent: 'div'; + classKey: GridClassKey; +}>; export default Grid; diff --git a/packages/material-ui/src/Grid/Grid.spec.tsx b/packages/material-ui/src/Grid/Grid.spec.tsx new file mode 100644 index 00000000000000..69a7e11f69848e --- /dev/null +++ b/packages/material-ui/src/Grid/Grid.spec.tsx @@ -0,0 +1,7 @@ +import React from 'react'; +import Paper from '@material-ui/core/Paper'; +import Grid from '@material-ui/core/Grid'; + +function responsiveTest() { + ; +}