@mui/x-data-grid
Version:
The Community plan edition of the Data Grid components (MUI X).
36 lines • 1.21 kB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import * as React from 'react';
import { styled } from '@mui/system';
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
import { useGridConfiguration } from '../../hooks/utils/useGridConfiguration';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
const GridPanelAnchor = styled('div')({
position: 'absolute',
top: `var(--DataGrid-headersTotalHeight)`,
left: 0
});
const Element = styled('div', {
name: 'MuiDataGrid',
slot: 'Main',
overridesResolver: (props, styles) => styles.main
})({
flexGrow: 1,
position: 'relative',
overflow: 'hidden'
});
export const GridMainContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
const rootProps = useGridRootProps();
const configuration = useGridConfiguration();
const ariaAttributes = configuration.hooks.useGridAriaAttributes();
return /*#__PURE__*/_jsxs(Element, _extends({
ref: ref,
ownerState: rootProps,
className: props.className,
tabIndex: -1
}, ariaAttributes, {
children: [/*#__PURE__*/_jsx(GridPanelAnchor, {
role: "presentation",
"data-id": "gridPanelAnchor"
}), props.children]
}));
});