UNPKG

2.03 kBJavaScriptView Raw
1import _extends from "@babel/runtime/helpers/esm/extends";
2import * as React from 'react';
3import PropTypes from 'prop-types';
4import { emphasize } from '@mui/system';
5import styled from '../styles/styled';
6import MoreHorizIcon from '../internal/svg-icons/MoreHoriz';
7import ButtonBase from '../ButtonBase';
8import { jsx as _jsx } from "react/jsx-runtime";
9var BreadcrumbCollapsedButton = styled(ButtonBase)(function (_ref) {
10 var theme = _ref.theme;
11 return _extends({
12 display: 'flex',
13 marginLeft: "calc(".concat(theme.spacing(1), " * 0.5)"),
14 marginRight: "calc(".concat(theme.spacing(1), " * 0.5)")
15 }, theme.palette.mode === 'light' ? {
16 backgroundColor: theme.palette.grey[100],
17 color: theme.palette.grey[700]
18 } : {
19 backgroundColor: theme.palette.grey[700],
20 color: theme.palette.grey[100]
21 }, {
22 borderRadius: 2,
23 '&:hover, &:focus': _extends({}, theme.palette.mode === 'light' ? {
24 backgroundColor: theme.palette.grey[200]
25 } : {
26 backgroundColor: theme.palette.grey[600]
27 }),
28 '&:active': _extends({
29 boxShadow: theme.shadows[0]
30 }, theme.palette.mode === 'light' ? {
31 backgroundColor: emphasize(theme.palette.grey[200], 0.12)
32 } : {
33 backgroundColor: emphasize(theme.palette.grey[600], 0.12)
34 })
35 });
36});
37var BreadcrumbCollapsedIcon = styled(MoreHorizIcon)({
38 width: 24,
39 height: 16
40});
41/**
42 * @ignore - internal component.
43 */
44
45function BreadcrumbCollapsed(props) {
46 var ownerState = props;
47 return /*#__PURE__*/_jsx("li", {
48 children: /*#__PURE__*/_jsx(BreadcrumbCollapsedButton, _extends({
49 focusRipple: true
50 }, props, {
51 ownerState: ownerState,
52 children: /*#__PURE__*/_jsx(BreadcrumbCollapsedIcon, {
53 ownerState: ownerState
54 })
55 }))
56 });
57}
58
59process.env.NODE_ENV !== "production" ? BreadcrumbCollapsed.propTypes = {
60 /**
61 * The system prop that allows defining system overrides as well as additional CSS styles.
62 */
63 sx: PropTypes.object
64} : void 0;
65export default BreadcrumbCollapsed;
\No newline at end of file