1 | 'use client';
|
2 |
|
3 | import * as React from 'react';
|
4 | import PropTypes from 'prop-types';
|
5 | import clsx from 'clsx';
|
6 | import composeClasses from '@mui/utils/composeClasses';
|
7 | import { styled } from "../zero-styled/index.js";
|
8 | import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
9 | import { getTableContainerUtilityClass } from "./tableContainerClasses.js";
|
10 | import { jsx as _jsx } from "react/jsx-runtime";
|
11 | const useUtilityClasses = ownerState => {
|
12 | const {
|
13 | classes
|
14 | } = ownerState;
|
15 | const slots = {
|
16 | root: ['root']
|
17 | };
|
18 | return composeClasses(slots, getTableContainerUtilityClass, classes);
|
19 | };
|
20 | const TableContainerRoot = styled('div', {
|
21 | name: 'MuiTableContainer',
|
22 | slot: 'Root',
|
23 | overridesResolver: (props, styles) => styles.root
|
24 | })({
|
25 | width: '100%',
|
26 | overflowX: 'auto'
|
27 | });
|
28 | const TableContainer = React.forwardRef(function TableContainer(inProps, ref) {
|
29 | const props = useDefaultProps({
|
30 | props: inProps,
|
31 | name: 'MuiTableContainer'
|
32 | });
|
33 | const {
|
34 | className,
|
35 | component = 'div',
|
36 | ...other
|
37 | } = props;
|
38 | const ownerState = {
|
39 | ...props,
|
40 | component
|
41 | };
|
42 | const classes = useUtilityClasses(ownerState);
|
43 | return _jsx(TableContainerRoot, {
|
44 | ref: ref,
|
45 | as: component,
|
46 | className: clsx(classes.root, className),
|
47 | ownerState: ownerState,
|
48 | ...other
|
49 | });
|
50 | });
|
51 | process.env.NODE_ENV !== "production" ? TableContainer.propTypes = {
|
52 |
|
53 |
|
54 |
|
55 |
|
56 | |
57 |
|
58 |
|
59 | children: PropTypes.node,
|
60 | |
61 |
|
62 |
|
63 | classes: PropTypes.object,
|
64 | |
65 |
|
66 |
|
67 | className: PropTypes.string,
|
68 | |
69 |
|
70 |
|
71 |
|
72 | component: PropTypes.elementType,
|
73 | |
74 |
|
75 |
|
76 | sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
77 | } : void 0;
|
78 | export default TableContainer; |
\ | No newline at end of file |