import { Box, Button, TextField } from "@mui/material";
import { useI18n } from "twake-i18n";
import { FieldWithLabel } from "./components/FieldWithLabel";
import { Description as DescriptionIcon } from "@mui/icons-material";
export function AddDescButton({
showDescription,
setShowDescription,
showMore,
description,
setDescription,
}: {
showDescription: boolean;
setShowDescription: (b: boolean) => void;
showMore: boolean;
description: string;
setDescription: (d: string) => void;
}) {
const { t } = useI18n();
return (
<>
{!showDescription && (
}
onClick={() => setShowDescription(true)}
size="small"
sx={{
textTransform: "none",
color: "text.secondary",
}}
>
{t("event.form.addDescription")}
)}
{showDescription && (
setDescription(e.target.value)}
size="small"
margin="dense"
multiline
minRows={2}
maxRows={10}
sx={{
"& .MuiInputBase-root": {
maxHeight: "33%",
overflowY: "auto",
},
"& textarea": {
resize: "vertical",
},
}}
/>
)}
>
);
}