diff --git a/packages/x-data-grid-premium/src/DataGridPremium/DataGrid.tsx b/packages/x-data-grid-premium/src/DataGridPremium/DataGrid.tsx index d65e73b9fc43..148a352b3f34 100644 --- a/packages/x-data-grid-premium/src/DataGridPremium/DataGrid.tsx +++ b/packages/x-data-grid-premium/src/DataGridPremium/DataGrid.tsx @@ -8,9 +8,10 @@ export function DataGrid() { throw new Error( [ - "You try to import `DataGrid` from @mui/x-data-grid-premium but this module doesn't exist.", + "You try to import `DataGrid` from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", + '', ].join('\n'), ); } @@ -25,9 +26,10 @@ export function DataGridPro() { throw new Error( [ - "You try to import `DataGridPro` from @mui/x-data-grid-premium but this module doesn't exist.", + "You try to import `DataGridPro` from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", + '', ].join('\n'), ); } diff --git a/packages/x-data-grid-pro/src/DataGridPro/DataGrid.tsx b/packages/x-data-grid-pro/src/DataGridPro/DataGrid.tsx index 0dca9c1f41c1..f14fd77dec17 100644 --- a/packages/x-data-grid-pro/src/DataGridPro/DataGrid.tsx +++ b/packages/x-data-grid-pro/src/DataGridPro/DataGrid.tsx @@ -8,9 +8,10 @@ export function DataGrid() { throw new Error( [ - "You try to import `DataGrid` from @mui/x-data-grid-pro but this module doesn't exist.", + "You try to import `DataGrid` from @mui/x-data-grid-pro but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPro } from '@mui/x-data-grid-pro'`.", + '', ].join('\n'), ); } @@ -25,9 +26,13 @@ export function DataGridPremium() { throw new Error( [ - "You try to import `DataGridPremium` from @mui/x-data-grid-pro but this module doesn't exist.", + "You try to import `DataGridPremium` from @mui/x-data-grid-pro but this module isn't exported from this npm package.", + '', + 'Instead, if you have a Premium plan license or want to try Premium, you can do this:', + `import { DataGridPremium } from '@mui/x-data-grid-premium'`, + '', + "Otherwise, you can stay on the Pro plan: `import { DataGridPro } from '@mui/x-data-grid-pro'`.", '', - "Instead, you can do `import { DataGridPro } from '@mui/x-data-grid-pro'`.", ].join('\n'), ); }