51 lines
1.9 KiB
JavaScript
51 lines
1.9 KiB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
const _excluded = ["className"];
|
|
import * as React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import clsx from 'clsx';
|
|
import { styled } from '@mui/system';
|
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
const useUtilityClasses = ownerState => {
|
|
const {
|
|
classes
|
|
} = ownerState;
|
|
const slots = {
|
|
root: ['panelFooter']
|
|
};
|
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
};
|
|
const GridPanelFooterRoot = styled('div', {
|
|
name: 'MuiDataGrid',
|
|
slot: 'PanelFooter',
|
|
overridesResolver: (props, styles) => styles.panelFooter
|
|
})(({
|
|
theme
|
|
}) => ({
|
|
padding: theme.spacing(0.5),
|
|
display: 'flex',
|
|
justifyContent: 'space-between'
|
|
}));
|
|
function GridPanelFooter(props) {
|
|
const {
|
|
className
|
|
} = props,
|
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
const rootProps = useGridRootProps();
|
|
const classes = useUtilityClasses(rootProps);
|
|
return /*#__PURE__*/_jsx(GridPanelFooterRoot, _extends({
|
|
className: clsx(className, classes.root),
|
|
ownerState: rootProps
|
|
}, other));
|
|
}
|
|
process.env.NODE_ENV !== "production" ? GridPanelFooter.propTypes = {
|
|
// ----------------------------- Warning --------------------------------
|
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
// ----------------------------------------------------------------------
|
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
} : void 0;
|
|
export { GridPanelFooter }; |