UNPKG

@mui/x-data-grid

Version:

The Community plan edition of the MUI X Data Grid components.

17 lines (16 loc) 687 B
"use strict"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default; Object.defineProperty(exports, "__esModule", { value: true }); exports.useGridRootProps = void 0; var React = _interopRequireWildcard(require("react")); var _GridRootPropsContext = require("../../context/GridRootPropsContext"); const useGridRootProps = () => { const contextValue = React.useContext(_GridRootPropsContext.GridRootPropsContext); if (!contextValue) { throw new Error('MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.'); } return contextValue; }; exports.useGridRootProps = useGridRootProps;