Can also be done using useState in react. On clicking the button, the state changes, and depending on the state we show the textarea.
const [clicked, setClicked] = useState(false);
<Textarea
placeholder="Add Your Note"
className={`${clicked ? "visible": "collapse"}`}
/>
<Button
onClick={(e) => {
setClicked(!clicked);
}}
>
Add Note
</Button>