1 | 'use client';
|
2 |
|
3 | import PropTypes from 'prop-types';
|
4 | import { createContainer } from '@mui/system';
|
5 | import capitalize from "../utils/capitalize.js";
|
6 | import styled from "../styles/styled.js";
|
7 | import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
8 | const Container = createContainer({
|
9 | createStyledComponent: styled('div', {
|
10 | name: 'MuiContainer',
|
11 | slot: 'Root',
|
12 | overridesResolver: (props, styles) => {
|
13 | const {
|
14 | ownerState
|
15 | } = props;
|
16 | return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
|
17 | }
|
18 | }),
|
19 | useThemeProps: inProps => useDefaultProps({
|
20 | props: inProps,
|
21 | name: 'MuiContainer'
|
22 | })
|
23 | });
|
24 | process.env.NODE_ENV !== "production" ? Container.propTypes = {
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | |
30 |
|
31 |
|
32 | children: PropTypes.node,
|
33 | |
34 |
|
35 |
|
36 | classes: PropTypes.object,
|
37 | |
38 |
|
39 |
|
40 |
|
41 | component: PropTypes.elementType,
|
42 | |
43 |
|
44 |
|
45 |
|
46 | disableGutters: PropTypes.bool,
|
47 | |
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | fixed: PropTypes.bool,
|
55 | |
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 | maxWidth: PropTypes .oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), PropTypes.string]),
|
62 | |
63 |
|
64 |
|
65 | sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
66 | } : void 0;
|
67 | export default Container; |
\ | No newline at end of file |