import { useState } from "react"; import Box from "@mui/material/Box"; import InputBase from "@mui/material/InputBase"; import { poppins } from "@/lib/theme"; import IconButton from "@mui/material/IconButton"; import SaveIcon from "@mui/icons-material/Save"; export function EditTitle({ value, onSave }: { value: string; onSave(value: string): void }) { const [text, setText] = useState(value); return ( <> { setText(event.target.value); }} onBlur={() => { onSave(text); }} /> { onSave(text); }} > ); }