UNPKG

2.87 kBJavaScriptView Raw
1'use client';
2
3import PropTypes from 'prop-types';
4import { createStack } from '@mui/system';
5import styled from "../styles/styled.js";
6import { useDefaultProps } from "../DefaultPropsProvider/index.js";
7const Stack = createStack({
8 createStyledComponent: styled('div', {
9 name: 'MuiStack',
10 slot: 'Root',
11 overridesResolver: (props, styles) => styles.root
12 }),
13 useThemeProps: inProps => useDefaultProps({
14 props: inProps,
15 name: 'MuiStack'
16 })
17});
18process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ = {
19 // ┌────────────────────────────── Warning ──────────────────────────────┐
20 // │ These PropTypes are generated from the TypeScript type definitions. │
21 // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
22 // └─────────────────────────────────────────────────────────────────────┘
23 /**
24 * The content of the component.
25 */
26 children: PropTypes.node,
27 /**
28 * The component used for the root node.
29 * Either a string to use a HTML element or a component.
30 */
31 component: PropTypes.elementType,
32 /**
33 * Defines the `flex-direction` style property.
34 * It is applied for all screen sizes.
35 * @default 'column'
36 */
37 direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
38 /**
39 * Add an element between each child.
40 */
41 divider: PropTypes.node,
42 /**
43 * Defines the space between immediate children.
44 * @default 0
45 */
46 spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
47 /**
48 * The system prop, which allows defining system overrides as well as additional CSS styles.
49 */
50 sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
51 /**
52 * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
53 *
54 * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
55 * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
56 *
57 * To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
58 * @default false
59 */
60 useFlexGap: PropTypes.bool
61} : void 0;
62export default Stack;
\No newline at end of file