Skip to content

Commit

Permalink
[DataGrid] Export GridColumnHeadersProps (#13229)
Browse files Browse the repository at this point in the history
  • Loading branch information
cherniavskii authored May 24, 2024
1 parent 81f6db7 commit 6d95073
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/pages/x/api/data-grid/data-grid-premium.json
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@
{
"name": "columnHeaders",
"description": "Component responsible for rendering the column headers.",
"default": "DataGridColumnHeaders",
"default": "GridColumnHeaders",
"class": "MuiDataGridPremium-columnHeaders"
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/data-grid/data-grid-pro.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@
{
"name": "columnHeaders",
"description": "Component responsible for rendering the column headers.",
"default": "DataGridColumnHeaders",
"default": "GridColumnHeaders",
"class": "MuiDataGridPro-columnHeaders"
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/data-grid/data-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@
{
"name": "columnHeaders",
"description": "Component responsible for rendering the column headers.",
"default": "DataGridColumnHeaders",
"default": "GridColumnHeaders",
"class": "MuiDataGrid-columnHeaders"
},
{
Expand Down
1 change: 1 addition & 0 deletions packages/x-data-grid-premium/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export * from './models';
export * from './components';

export { GridColumnHeaders } from '@mui/x-data-grid-pro';
export type { GridColumnHeadersProps } from '@mui/x-data-grid-pro';

export type {
DataGridPremiumProps,
Expand Down
4 changes: 2 additions & 2 deletions packages/x-data-grid-pro/src/components/GridColumnHeaders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ const Filler = styled('div')({
backgroundColor: 'var(--DataGrid-containerBackground)',
});

interface DataGridProColumnHeadersProps
export interface GridColumnHeadersProps
extends React.HTMLAttributes<HTMLDivElement>,
UseGridColumnHeadersProps {}

const GridColumnHeaders = React.forwardRef<HTMLDivElement, DataGridProColumnHeadersProps>(
const GridColumnHeaders = React.forwardRef<HTMLDivElement, GridColumnHeadersProps>(
function GridColumnHeaders(props, ref) {
const {
style,
Expand Down
1 change: 1 addition & 0 deletions packages/x-data-grid-pro/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ export {
} from './components/reexports';

export { GridColumnHeaders } from './components/GridColumnHeaders';
export type { GridColumnHeadersProps } from './components/GridColumnHeaders';
1 change: 1 addition & 0 deletions packages/x-data-grid/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type { GridToolbarExportProps } from './components/toolbar/GridToolbarExp
export type { GridExportFormat, GridExportExtension } from './models/gridExport';

export { GridColumnHeaders } from './components/GridColumnHeaders';
export type { GridColumnHeadersProps } from './components/GridColumnHeaders';

/**
* Reexportable components.
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/models/gridSlotsComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export interface GridSlotsComponent extends GridBaseSlots, GridIconSlotsComponen
columnMenu: React.JSXElementConstructor<GridSlotProps['columnMenu']>;
/**
* Component responsible for rendering the column headers.
* @default DataGridColumnHeaders
* @default GridColumnHeaders
*/
columnHeaders: React.JSXElementConstructor<GridSlotProps['columnHeaders']>;
/**
Expand Down
1 change: 1 addition & 0 deletions scripts/x-data-grid-premium.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
{ "name": "GridColumnHeaderSeparatorSides", "kind": "Enum" },
{ "name": "GridColumnHeaderSortIcon", "kind": "Variable" },
{ "name": "GridColumnHeaderSortIconProps", "kind": "Interface" },
{ "name": "GridColumnHeadersProps", "kind": "Interface" },
{ "name": "GridColumnHeaderTitle", "kind": "Function" },
{ "name": "GridColumnHeaderTitleProps", "kind": "Interface" },
{ "name": "GridColumnIcon", "kind": "Variable" },
Expand Down
1 change: 1 addition & 0 deletions scripts/x-data-grid-pro.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
{ "name": "GridColumnHeaderSeparatorSides", "kind": "Enum" },
{ "name": "GridColumnHeaderSortIcon", "kind": "Variable" },
{ "name": "GridColumnHeaderSortIconProps", "kind": "Interface" },
{ "name": "GridColumnHeadersProps", "kind": "Interface" },
{ "name": "GridColumnHeaderTitle", "kind": "Function" },
{ "name": "GridColumnHeaderTitleProps", "kind": "Interface" },
{ "name": "GridColumnIcon", "kind": "Variable" },
Expand Down
1 change: 1 addition & 0 deletions scripts/x-data-grid.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
{ "name": "GridColumnHeaderSeparatorSides", "kind": "Enum" },
{ "name": "GridColumnHeaderSortIcon", "kind": "Variable" },
{ "name": "GridColumnHeaderSortIconProps", "kind": "Interface" },
{ "name": "GridColumnHeadersProps", "kind": "Interface" },
{ "name": "GridColumnHeaderTitle", "kind": "Function" },
{ "name": "GridColumnHeaderTitleProps", "kind": "Interface" },
{ "name": "GridColumnIcon", "kind": "Variable" },
Expand Down

0 comments on commit 6d95073

Please sign in to comment.