Skip to content

Commit

Permalink
[CssBaseline] Change of children type to ReactNode (#19770)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfernandez-asapp committed Feb 19, 2020
1 parent fde2343 commit cd8a636
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/material-ui/src/CssBaseline/CssBaseline.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';

export interface CssBaselineProps {
children?: React.ReactElement;
children?: React.ReactNode;
}

declare const CssBaseline: React.ComponentType<CssBaselineProps>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';

export interface ScopedCssBaselineProps {
children?: React.ReactElement;
children?: React.ReactNode;
}

declare const ScopedCssBaseline: React.ComponentType<ScopedCssBaselineProps>;
Expand Down
6 changes: 6 additions & 0 deletions packages/material-ui/test/typescript/components.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
CircularProgress,
ClickAwayListener,
Collapse,
CssBaseline,
Dialog,
DialogTitle,
DialogContent,
Expand Down Expand Up @@ -80,6 +81,7 @@ import {
import { Link as ReactRouterLink, LinkProps as ReactRouterLinkProps } from 'react-router-dom';
import { ButtonBaseActions } from '@material-ui/core/ButtonBase';
import { IconButtonProps } from '@material-ui/core/IconButton';
import ScopedCssBaseline from '@material-ui/core/ScopedCssBaseline';

const log = console.log;
const FakeIcon = () => <div>ICON</div>;
Expand Down Expand Up @@ -1056,3 +1058,7 @@ const refTest = () => {
}}
/>;
};

const CssBaselineTest = () => <CssBaseline>Test</CssBaseline>;

const ScopedCssBaselineTest = () => <ScopedCssBaseline>Test</ScopedCssBaseline>;

0 comments on commit cd8a636

Please sign in to comment.