46 lines
1.9 KiB
JavaScript
46 lines
1.9 KiB
JavaScript
'use client';
|
|
|
|
import PropTypes from 'prop-types';
|
|
import ClassNameGenerator from '@mui/utils/ClassNameGenerator';
|
|
import createBox from "../createBox/index.mjs";
|
|
import boxClasses from "./boxClasses.mjs";
|
|
|
|
// The SimpleSystemKeys are subset of the AllSystemCSSProperties, so this should be ok
|
|
// This is needed as these are used as keys inside AllSystemCSSProperties
|
|
|
|
/**
|
|
*
|
|
* Demos:
|
|
*
|
|
* - [Box (Material UI)](https://mui.com/material-ui/react-box/)
|
|
* - [Menubar (Material UI)](https://mui.com/material-ui/react-menubar/)
|
|
* - [Box (MUI System)](https://mui.com/system/react-box/)
|
|
*
|
|
* API:
|
|
*
|
|
* - [Box API](https://mui.com/system/api/box/)
|
|
*/
|
|
const Box = createBox({
|
|
defaultClassName: boxClasses.root,
|
|
generateClassName: ClassNameGenerator.generate
|
|
});
|
|
process.env.NODE_ENV !== "production" ? Box.propTypes /* remove-proptypes */ = {
|
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
/**
|
|
* @ignore
|
|
*/
|
|
children: PropTypes.node,
|
|
/**
|
|
* The component used for the root node.
|
|
* Either a string to use a HTML element or a component.
|
|
*/
|
|
component: PropTypes.elementType,
|
|
/**
|
|
* The system prop that 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])
|
|
} : void 0;
|
|
export default Box; |