-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
Container.output.js
119 lines (119 loc) · 3.25 KB
/
Container.output.js
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
import { styled as _styled } from '@pigment-css/react';
import _theme from '@pigment-css/react/theme';
import * as React from 'react';
import PropTypes from 'prop-types';
const ContainerRoot = /*#__PURE__*/ _styled('div', {
name: 'MuiContainer',
slot: 'Root',
})({
classes: ['c12mgz3n'],
variants: [
{
props: (props) => !props.disableGutters,
className: 'c12mgz3n-1',
},
{
props: {
fixed: true,
},
className: 'c12mgz3n-2',
},
{
props: {
maxWidth: 'xs',
},
className: 'c12mgz3n-3',
},
{
props: {
maxWidth: 'sm',
},
className: 'c12mgz3n-4',
},
{
props: {
maxWidth: 'md',
},
className: 'c12mgz3n-5',
},
{
props: {
maxWidth: 'lg',
},
className: 'c12mgz3n-6',
},
{
props: {
maxWidth: 'xl',
},
className: 'c12mgz3n-7',
},
],
});
const Container = React.forwardRef(function Container(props, ref) {
const {
className,
component = 'div',
disableGutters = false,
fixed = false,
maxWidth = 'lg',
// classes: classesProp,
...other
} = props;
const ownerState = {
...props,
component,
disableGutters,
fixed,
maxWidth,
};
return (
// @ts-ignore theme is injected by the styled util
<ContainerRoot
as={component}
// @ts-ignore module augmentation fails if custom breakpoints are used
ownerState={ownerState}
className={className}
ref={ref}
{...other}
/>
);
});
process.env.NODE_ENV !== 'production'
? (Container.propTypes /* remove-proptypes */ = {
// ┌────────────────────────────── Warning ──────────────────────────────┐
// │ These PropTypes are generated from the TypeScript type definitions. │
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
// └─────────────────────────────────────────────────────────────────────┘
/**
* The content of the component.
*/
children: PropTypes.node,
/**
* The component used for the root node.
* Either a string to use a HTML element or a component.
*/
component: PropTypes.elementType,
/**
* If `true`, the left and right padding is removed.
* @default false
*/
disableGutters: PropTypes.bool,
/**
* Set the max-width to match the min-width of the current breakpoint.
* This is useful if you'd prefer to design for a fixed set of sizes
* instead of trying to accommodate a fully fluid viewport.
* It's fluid by default.
* @default false
*/
fixed: PropTypes.bool,
/**
* Determine the max-width of the container.
* The container width grows with the size of the screen.
* Set to `false` to disable `maxWidth`.
* @default 'lg'
*/
maxWidth: PropTypes.oneOf(['lg', 'md', 'sm', 'xl', 'xs', false]),
})
: void 0;
export default Container;