import { ReactNode } from 'react' ; import { TableHeader } from '../table' ; import './OrderableTableHeader.scss' ; import { classnames } from '../../helpers' ; interface Props { cells ? : ReactNode [ ] ; className ? : string ; children ? : ReactNode ; } const OrderableTableHeader = ( { cells = [ ] , className = '' , children = null , ... rest } ) => ( < TableHeader cells = { [ null , ... cells , ] } className = { classnames ( [ 'orderableTableHeader' , className ] ) } { ... rest } > { children } < /TableHeader>); export default OrderableTableHeader ;