/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/mui-material/src/Stack/Stack.js
73 строки
3 KB
Siriwat K
[core] Remove leftover Joy UI references (#48719)
25 июн 2026, 14:09
Не верифицирован
25 июн 2026, 14:09
0cc3e24
Код
Авторство
О чём код?
'use client'; import PropTypes from 'prop-types'; import { createStack } from '@mui/system'; import styled from '../styles/styled'; import { useDefaultProps } from '../DefaultPropsProvider'; const Stack = createStack({ createStyledComponent: styled('div', { name: 'MuiStack', slot: 'Root', }), useThemeProps: (inProps) => useDefaultProps({ props: inProps, name: 'MuiStack' }), }); Stack.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, /** * Defines the `flex-direction` style property. * It is applied for all screen sizes. * @default 'column' */ direction: PropTypes.oneOfType([ PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object, ]), /** * Add an element between each child. */ divider: PropTypes.node, /** * Defines the space between immediate children. * @default 0 */ spacing: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string, ]), /** * The system prop, which allows defining system overrides as well as additional CSS styles. */ sx: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object, ]), /** * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children. * * While CSS `gap` removes the known limitations, * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag. * * To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration. * @default false */ useFlexGap: PropTypes.bool, }; export default Stack;