88
99import {
1010 ComponentType ,
11- JSXElementConstructor ,
1211 ReactNode ,
1312 HTMLAttributes ,
1413 CSSProperties ,
@@ -18,7 +17,6 @@ import {
1817 Ref ,
1918 Component ,
2019 PropsWithChildren ,
21- ComponentClass ,
2220} from 'react' ;
2321import {
2422 VariableSizeGridProps ,
@@ -279,7 +277,7 @@ export type CommonGridProps = CommonProps &
279277 * allowing hooks, context, and other React concepts to be used.
280278 * It receives #EuiDataGridCustomBodyProps as its only argument.
281279 */
282- renderCustomGridBody ?: ( args : EuiDataGridCustomBodyProps ) => ReactNode ;
280+ renderCustomGridBody ?: ComponentType < EuiDataGridCustomBodyProps > ;
283281 /**
284282 * Defines the initial style of the grid. Accepts a partial #EuiDataGridStyle object.
285283 * Settings provided may be overwritten or merged with user defined preferences if `toolbarVisibility.showDisplaySelector.allowDensity = true` (which is the default).
@@ -454,7 +452,7 @@ export interface EuiDataGridCustomBodyProps {
454452 * You may also pass in any other optional cell prop overrides
455453 * that `EuiDataGridCell` accepts, such as `isExpandable` or `renderCellValue`.
456454 */
457- Cell : JSXElementConstructor <
455+ Cell : ComponentType <
458456 {
459457 colIndex : number ;
460458 visibleRowIndex : number ;
@@ -560,7 +558,7 @@ export interface EuiDataGridCellPopoverElementProps
560558 * For certain columns or schemas, you may want to fall back to the standard EuiDataGrid popover display.
561559 * If so, that component is provided here as a passed React function component for your usage.
562560 */
563- DefaultCellPopover : JSXElementConstructor < EuiDataGridCellPopoverElementProps > ;
561+ DefaultCellPopover : ComponentType < EuiDataGridCellPopoverElementProps > ;
564562 /**
565563 * Allows passing props to the wrapping cell expansion popover and panel.
566564 * Accepts any props that `EuiPopover` accepts, except for `button` and `closePopover`.
@@ -582,12 +580,8 @@ export interface EuiDataGridCellProps {
582580 isExpandable : boolean ;
583581 className ?: string ;
584582 popoverContext : DataGridCellPopoverContextShape ;
585- renderCellValue :
586- | ( ( props : EuiDataGridCellValueElementProps ) => ReactNode )
587- | ComponentClass < EuiDataGridCellValueElementProps > ;
588- renderCellPopover ?:
589- | JSXElementConstructor < EuiDataGridCellPopoverElementProps >
590- | ( ( props : EuiDataGridCellPopoverElementProps ) => ReactNode ) ;
583+ renderCellValue : ComponentType < EuiDataGridCellValueElementProps > ;
584+ renderCellPopover ?: ComponentType < EuiDataGridCellPopoverElementProps > ;
591585 setRowHeight ?: ( height : number ) => void ;
592586 getRowHeight ?: ( rowIndex : number ) => number ;
593587 style ?: React . CSSProperties ;
@@ -706,9 +700,8 @@ export interface EuiDataGridColumn {
706700 visibleCellActions ?: number ;
707701}
708702
709- export type EuiDataGridColumnCellAction = (
710- props : EuiDataGridColumnCellActionProps
711- ) => ReactNode ;
703+ export type EuiDataGridColumnCellAction =
704+ ComponentType < EuiDataGridColumnCellActionProps > ;
712705
713706export interface EuiDataGridColumnActions {
714707 /**
0 commit comments