@mui/x-data-grid
Version:
The community edition of the data grid component (MUI X).
52 lines • 2.13 kB
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 { unstable_composeClasses as composeClasses } from '@mui/utils';
import { styled } from '@mui/system';
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: ['footerContainer', 'withBorderColor']
};
return composeClasses(slots, getDataGridUtilityClass, classes);
};
const GridFooterContainerRoot = styled('div', {
name: 'MuiDataGrid',
slot: 'FooterContainer',
overridesResolver: (props, styles) => styles.footerContainer
})({
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
minHeight: 52,
borderTop: '1px solid'
});
const GridFooterContainer = /*#__PURE__*/React.forwardRef(function GridFooterContainer(props, ref) {
const {
className
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
const rootProps = useGridRootProps();
const classes = useUtilityClasses(rootProps);
return /*#__PURE__*/_jsx(GridFooterContainerRoot, _extends({
ref: ref,
className: clsx(classes.root, className),
ownerState: rootProps
}, other));
});
process.env.NODE_ENV !== "production" ? GridFooterContainer.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 { GridFooterContainer };