Hi i can't figure out how to set up the onclick function for the action below for Antd Card. Could someone help me pls? thanks.
const expand = () =>{
console.log("expand")
}
const IconText = ({ icon, text, cb }) => (
<Space>
<div onClick={e => cb}>
{React.createElement(icon)}
{text}
</div>
</Space>
);
<Card style={{ width: props.width, height: props.height }}
actions={[
<IconText icon={ExpandOutlined} text="Expand" key="list-vertical-star-o" cb={()=>expand}/>,
<IconText icon={MessageOutlined} text="Comments" key="list-vertical-like-o" />,
]}
>