Blame view

天文台pc/tianwentai-ui/node_modules/@mui/system/esm/useThemeProps/getThemeProps.js 349 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
  import resolveProps from '@mui/utils/resolveProps';
  export default function getThemeProps(params) {
    const {
      theme,
      name,
      props
    } = params;
    if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {
      return props;
    }
    return resolveProps(theme.components[name].defaultProps, props);
  }