import { Card, Button, Input, Space } from 'antd'; import React, { useState } from 'react'; type InfoCardProps = { onAdd: (content: string) => void; } const InfoCard:React.FC = ({onAdd}) => { const [content, setContent] = useState(''); const handleAdd = () => { if(content){ onAdd(content); setContent(''); } } return ( setContent(e.target.value)} > ); } export default InfoCard;