1 | import _extends from "@babel/runtime/helpers/esm/extends";
|
2 | import * as React from 'react';
|
3 | import PropTypes from 'prop-types';
|
4 | import withStyles from '../styles/withStyles';
|
5 | import { exactProp } from '@material-ui/utils';
|
6 | export const html = {
|
7 | WebkitFontSmoothing: 'antialiased',
|
8 |
|
9 | MozOsxFontSmoothing: 'grayscale',
|
10 |
|
11 |
|
12 |
|
13 | boxSizing: 'border-box'
|
14 | };
|
15 | export const body = theme => _extends({
|
16 | color: theme.palette.text.primary
|
17 | }, theme.typography.body2, {
|
18 | backgroundColor: theme.palette.background.default,
|
19 | '@media print': {
|
20 |
|
21 | backgroundColor: theme.palette.common.white
|
22 | }
|
23 | });
|
24 | export const styles = theme => ({
|
25 | '@global': {
|
26 | html,
|
27 | '*, *::before, *::after': {
|
28 | boxSizing: 'inherit'
|
29 | },
|
30 | 'strong, b': {
|
31 | fontWeight: theme.typography.fontWeightBold
|
32 | },
|
33 | body: _extends({
|
34 | margin: 0
|
35 | }, body(theme), {
|
36 |
|
37 |
|
38 | '&::backdrop': {
|
39 | backgroundColor: theme.palette.background.default
|
40 | }
|
41 | })
|
42 | }
|
43 | });
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | function CssBaseline(props) {
|
49 |
|
50 | const {
|
51 | children = null,
|
52 | classes
|
53 | } = props;
|
54 |
|
55 |
|
56 | return React.createElement(React.Fragment, null, children);
|
57 | }
|
58 |
|
59 | process.env.NODE_ENV !== "production" ? CssBaseline.propTypes = {
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 | |
66 |
|
67 |
|
68 | children: PropTypes.node,
|
69 |
|
70 | |
71 |
|
72 |
|
73 |
|
74 | classes: PropTypes.object
|
75 | } : void 0;
|
76 |
|
77 | if (process.env.NODE_ENV !== 'production') {
|
78 |
|
79 | CssBaseline['propTypes' + ''] = exactProp(CssBaseline.propTypes);
|
80 | }
|
81 |
|
82 | export default withStyles(styles, {
|
83 | name: 'MuiCssBaseline'
|
84 | })(CssBaseline); |
\ | No newline at end of file |