import { PencilIcon } from "@heroicons/react/solid"; import { useState } from "react"; const EditableHeading = ({ title, onChange }: { title: string; onChange: (value: string) => void }) => { const [editIcon, setEditIcon] = useState(true); return (
setEditIcon(false)}> {editIcon ? ( <>

{title}

) : (
onChange(e.target.value)} />
)}
); }; export default EditableHeading;