1 | import * as React from 'react';
|
2 | import PropTypes from 'prop-types';
|
3 | import clsx from 'clsx';
|
4 |
|
5 | import Container from '@mui/material-pigment-css/Container';
|
6 | import capitalize from '@mui/utils/capitalize';
|
7 | import composeClasses from '@mui/utils/composeClasses';
|
8 | import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
9 | import { jsx as _jsx } from "react/jsx-runtime";
|
10 | const useUtilityClasses = ownerState => {
|
11 | const {
|
12 | classes,
|
13 | fixed,
|
14 | disableGutters,
|
15 | maxWidth
|
16 | } = ownerState;
|
17 | const slots = {
|
18 | root: ['root', maxWidth && `maxWidth${capitalize(String(maxWidth))}`, fixed && 'fixed', disableGutters && 'disableGutters']
|
19 | };
|
20 | return composeClasses(slots, slot => generateUtilityClass('MuiContainer', slot), classes);
|
21 | };
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | const PigmentContainer = React.forwardRef(function PigmentContainer({
|
33 | className,
|
34 | disableGutters = false,
|
35 | fixed = false,
|
36 | maxWidth = 'lg',
|
37 | ...props
|
38 | }, ref) {
|
39 | const ownerState = {
|
40 | ...props,
|
41 | disableGutters,
|
42 | fixed,
|
43 | maxWidth
|
44 | };
|
45 | const classes = useUtilityClasses(ownerState);
|
46 | return _jsx(Container, {
|
47 | className: clsx(classes.root, className),
|
48 | disableGutters: disableGutters,
|
49 | fixed: fixed,
|
50 | maxWidth: maxWidth,
|
51 | ...props,
|
52 |
|
53 | ref: ref
|
54 | });
|
55 | });
|
56 | process.env.NODE_ENV !== "production" ? PigmentContainer.propTypes = {
|
57 |
|
58 |
|
59 |
|
60 |
|
61 | |
62 |
|
63 |
|
64 | children: PropTypes.node,
|
65 | |
66 |
|
67 |
|
68 | classes: PropTypes.object,
|
69 | |
70 |
|
71 |
|
72 | className: PropTypes.string,
|
73 | |
74 |
|
75 |
|
76 |
|
77 | disableGutters: PropTypes.bool,
|
78 | |
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 | fixed: PropTypes.bool,
|
86 | |
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 | maxWidth: PropTypes.oneOf(['lg', 'md', 'sm', 'xl', 'xs', false]),
|
93 | |
94 |
|
95 |
|
96 | sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
97 | } : void 0;
|
98 | export default PigmentContainer; |
\ | No newline at end of file |