import { EditOutlined } from "@ant-design/icons"; import { Input, Typography } from "antd"; import { useState } from "react"; export default function MyTypography({ value, setValue, maxLength }) { const [editing, setEditing] = useState(false); return (
{editing ? ( setValue(e.target.value)} maxLength={maxLength} showCount /> ) : ( {value} )} setEditing(!editing)} />
); }