Blame view

天文台pc/tianwentai-ui/node_modules/@mui/material/esm/Breadcrumbs/BreadcrumbCollapsed.js 2.51 KB
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
  'use client';
  
  import PropTypes from 'prop-types';
  import { emphasize } from '@mui/system/colorManipulator';
  import { styled } from "../zero-styled/index.js";
  import memoTheme from "../utils/memoTheme.js";
  import MoreHorizIcon from "../internal/svg-icons/MoreHoriz.js";
  import ButtonBase from "../ButtonBase/index.js";
  import { jsx as _jsx } from "react/jsx-runtime";
  const BreadcrumbCollapsedButton = styled(ButtonBase, {
    name: 'MuiBreadcrumbCollapsed'
  })(memoTheme(({
    theme
  }) => ({
    display: 'flex',
    marginLeft: `calc(${theme.spacing(1)} * 0.5)`,
    marginRight: `calc(${theme.spacing(1)} * 0.5)`,
    ...(theme.palette.mode === 'light' ? {
      backgroundColor: theme.palette.grey[100],
      color: theme.palette.grey[700]
    } : {
      backgroundColor: theme.palette.grey[700],
      color: theme.palette.grey[100]
    }),
    borderRadius: 2,
    '&:hover, &:focus': {
      ...(theme.palette.mode === 'light' ? {
        backgroundColor: theme.palette.grey[200]
      } : {
        backgroundColor: theme.palette.grey[600]
      })
    },
    '&:active': {
      boxShadow: theme.shadows[0],
      ...(theme.palette.mode === 'light' ? {
        backgroundColor: emphasize(theme.palette.grey[200], 0.12)
      } : {
        backgroundColor: emphasize(theme.palette.grey[600], 0.12)
      })
    }
  })));
  const BreadcrumbCollapsedIcon = styled(MoreHorizIcon)({
    width: 24,
    height: 16
  });
  
  /**
   * @ignore - internal component.
   */
  function BreadcrumbCollapsed(props) {
    const {
      slots = {},
      slotProps = {},
      ...otherProps
    } = props;
    const ownerState = props;
    return /*#__PURE__*/_jsx("li", {
      children: /*#__PURE__*/_jsx(BreadcrumbCollapsedButton, {
        focusRipple: true,
        ...otherProps,
        ownerState: ownerState,
        children: /*#__PURE__*/_jsx(BreadcrumbCollapsedIcon, {
          as: slots.CollapsedIcon,
          ownerState: ownerState,
          ...slotProps.collapsedIcon
        })
      })
    });
  }
  process.env.NODE_ENV !== "production" ? BreadcrumbCollapsed.propTypes = {
    /**
     * The props used for the CollapsedIcon slot.
     * @default {}
     */
    slotProps: PropTypes.shape({
      collapsedIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
    }),
    /**
     * The components used for each slot inside the BreadcumbCollapsed.
     * Either a string to use a HTML element or a component.
     * @default {}
     */
    slots: PropTypes.shape({
      CollapsedIcon: PropTypes.elementType
    }),
    /**
     * The system prop that allows defining system overrides as well as additional CSS styles.
     */
    sx: PropTypes.object
  } : void 0;
  export default BreadcrumbCollapsed;