Skip to content

Commit

Permalink
add experimental headless exports
Browse files Browse the repository at this point in the history
  • Loading branch information
lauri865 committed Nov 28, 2024
1 parent eb491c6 commit 266c113
Show file tree
Hide file tree
Showing 15 changed files with 3,152 additions and 2,983 deletions.
1,157 changes: 18 additions & 1,139 deletions packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx

Large diffs are not rendered by default.

1,146 changes: 1,146 additions & 0 deletions packages/x-data-grid-premium/src/DataGridPremium/DataGridPremiumHeadless.tsx

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/x-data-grid-premium/src/DataGridPremium/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './DataGrid';
export * from './DataGridPremium';
export { GridSlots } from './DataGridPremiumHeadless';
export { DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES } from './useDataGridPremiumProps';
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import { DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS } from '@mui/x-data-grid-pro/internals';
import {
DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS,
generateDefaultSlots,
} from '@mui/x-data-grid-pro/internals';
import type { GridPremiumSlotsComponent } from '../models';
import { GridPremiumColumnMenu } from '../components/GridPremiumColumnMenu';
import materialSlots from '../material';

const iconsSlots: Array<keyof GridPremiumSlotsComponent> = [
'columnMenuUngroupIcon',
'columnMenuGroupIcon',
'columnMenuAggregationIcon',
'toolbarPromptSendIcon',
'toolbarPromptRecordIcon',
];

export const DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS: GridPremiumSlotsComponent = {
...DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS,
...materialSlots,
...generateDefaultSlots<keyof GridPremiumSlotsComponent>(iconsSlots),
columnMenu: GridPremiumColumnMenu,
};
1 change: 1 addition & 0 deletions packages/x-data-grid-premium/src/headless/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { DataGridPremiumHeadless as Unstable_DatagridPremium } from '../DataGridPremium/DataGridPremiumHeadless';
Loading

0 comments on commit 266c113

Please sign in to comment.