UNPKG

@mui/x-data-grid

Version:

The community edition of the data grid component (MUI X).

9 lines 409 B
import * as React from 'react'; import { GridRootPropsContext } from '../../context/GridRootPropsContext'; export var useGridRootProps = function useGridRootProps() { var contextValue = React.useContext(GridRootPropsContext); if (!contextValue) { throw new Error('MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.'); } return contextValue; };