import React from 'react' ; import { Space } from 'antd' ; import './index.less' ; export interface ToolBarProps < T = unknown > { title ? : React . ReactNode ; actions ? : React . ReactNode [ ] ; className ? : string ; } const ToolBar = < T , U = { } > ( { title , actions , className } ) => { return ( < div className = { className } > < div className = { `${ className }-title` } > { title } < /div> < div className = { `${ className }-option` } > { actions && ( < Space > { actions . filter ( ( item ) => item ) . map ( ( node , index ) => ( < div key = { index } > { node } < /div>))} < /Space>)} < /div> < /div>); } ; export default ToolBar ;