UNPKG

1.77 kBJavaScriptView Raw
1import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2import _extends from "@babel/runtime/helpers/esm/extends";
3import * as React from 'react';
4import PropTypes from 'prop-types';
5import clsx from 'clsx';
6import { withStyles } from '@material-ui/core/styles';
7import { html, body } from '../CssBaseline/CssBaseline';
8export const styles = theme => ({
9 /* Styles applied to the root element. */
10 root: _extends({}, html, body(theme), {
11 '& *, & *::before, & *::after': {
12 boxSizing: 'inherit'
13 },
14 '& strong, & b': {
15 fontWeight: theme.typography.fontWeightBold
16 }
17 })
18});
19const ScopedCssBaseline = /*#__PURE__*/React.forwardRef(function ScopedCssBaseline(props, ref) {
20 const {
21 classes,
22 className
23 } = props,
24 other = _objectWithoutPropertiesLoose(props, ["classes", "className"]);
25
26 return /*#__PURE__*/React.createElement("div", _extends({
27 className: clsx(classes.root, className),
28 ref: ref
29 }, other));
30});
31process.env.NODE_ENV !== "production" ? ScopedCssBaseline.propTypes = {
32 // ----------------------------- Warning --------------------------------
33 // | These PropTypes are generated from the TypeScript type definitions |
34 // | To update them edit the d.ts file and run "yarn proptypes" |
35 // ----------------------------------------------------------------------
36
37 /**
38 * The content of the component.
39 */
40 children: PropTypes.node,
41
42 /**
43 * Override or extend the styles applied to the component.
44 * See [CSS API](#css) below for more details.
45 */
46 classes: PropTypes.object,
47
48 /**
49 * @ignore
50 */
51 className: PropTypes.string
52} : void 0;
53export default withStyles(styles, {
54 name: 'MuiScopedCssBaseline'
55})(ScopedCssBaseline);
\No newline at end of file