UNPKG

@wordpress/components

Version:
25 lines (22 loc) 437 B
/** * WordPress dependencies */ import { forwardRef } from '@wordpress/element'; /** * Internal dependencies */ import TreeGridItem from './item'; export default forwardRef( function TreeGridCell( { children, withoutGridItem = false, ...props }, ref ) { return ( <td { ...props } role="gridcell"> { withoutGridItem ? ( children ) : ( <TreeGridItem ref={ ref }>{ children }</TreeGridItem> ) } </td> ); } );