1 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
2 | import _extends from "@babel/runtime/helpers/esm/extends";
|
3 | import * as React from 'react';
|
4 | import PropTypes from 'prop-types';
|
5 | import clsx from 'clsx';
|
6 | import { withStyles } from '@material-ui/core/styles';
|
7 | import { html, body } from '../CssBaseline/CssBaseline';
|
8 | export const styles = theme => ({
|
9 |
|
10 | root: _extends({}, html, body(theme), {
|
11 | '& *, & *::before, & *::after': {
|
12 | boxSizing: 'inherit'
|
13 | },
|
14 | '& strong, & b': {
|
15 | fontWeight: theme.typography.fontWeightBold
|
16 | }
|
17 | })
|
18 | });
|
19 | const ScopedCssBaseline = React.forwardRef(function ScopedCssBaseline(props, ref) {
|
20 | const {
|
21 | classes,
|
22 | className
|
23 | } = props,
|
24 | other = _objectWithoutPropertiesLoose(props, ["classes", "className"]);
|
25 |
|
26 | return React.createElement("div", _extends({
|
27 | className: clsx(classes.root, className),
|
28 | ref: ref
|
29 | }, other));
|
30 | });
|
31 | process.env.NODE_ENV !== "production" ? ScopedCssBaseline.propTypes = {
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | |
38 |
|
39 |
|
40 | children: PropTypes.node,
|
41 |
|
42 | |
43 |
|
44 |
|
45 |
|
46 | classes: PropTypes.object,
|
47 |
|
48 | |
49 |
|
50 |
|
51 | className: PropTypes.string
|
52 | } : void 0;
|
53 | export default withStyles(styles, {
|
54 | name: 'MuiScopedCssBaseline'
|
55 | })(ScopedCssBaseline); |
\ | No newline at end of file |