@mui/x-data-grid-premium
Version:
The Premium plan edition of the MUI X Data Grid Components.
41 lines • 1.5 kB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
const _excluded = ["formattedValue", "colDef", "cellMode", "row", "api", "id", "value", "rowNode", "field", "focusElementRef", "hasFocus", "tabIndex", "isEditable"];
import { getDataGridUtilityClass } from '@mui/x-data-grid';
import { vars } from '@mui/x-data-grid/internals';
import { styled } from '@mui/material/styles';
import composeClasses from '@mui/utils/composeClasses';
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
import { jsx as _jsx } from "react/jsx-runtime";
const GridFooterCellRoot = styled('div', {
name: 'MuiDataGrid',
slot: 'FooterCell'
})({
fontWeight: vars.typography.fontWeight.medium,
color: vars.colors.foreground.accent
});
const useUtilityClasses = ownerState => {
const {
classes
} = ownerState;
const slots = {
root: ['footerCell']
};
return composeClasses(slots, getDataGridUtilityClass, classes);
};
function GridFooterCell(props) {
const {
formattedValue
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
const rootProps = useGridRootProps();
const ownerState = rootProps;
const classes = useUtilityClasses(ownerState);
return /*#__PURE__*/_jsx(GridFooterCellRoot, _extends({
ownerState: ownerState,
className: classes.root
}, other, {
children: formattedValue
}));
}
export { GridFooterCell };