Blame view

天文台pc/tianwentai-ui/node_modules/@mui/styled-engine/esm/GlobalStyles/GlobalStyles.js 764 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  'use client';
  
  import PropTypes from 'prop-types';
  import { Global } from '@emotion/react';
  import { jsx as _jsx } from "react/jsx-runtime";
  function isEmpty(obj) {
    return obj === undefined || obj === null || Object.keys(obj).length === 0;
  }
  export default function GlobalStyles(props) {
    const {
      styles,
      defaultTheme = {}
    } = props;
    const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;
    return /*#__PURE__*/_jsx(Global, {
      styles: globalStyles
    });
  }
  process.env.NODE_ENV !== "production" ? GlobalStyles.propTypes = {
    defaultTheme: PropTypes.object,
    styles: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.object, PropTypes.func])
  } : void 0;