import { Box, Button, TextField, useTheme } from "@linagora/twake-mui"; import { alpha } from "@mui/material/styles"; import { Notes as NotesIcon } from "@mui/icons-material"; import { useI18n } from "twake-i18n"; import { FieldWithLabel } from "./components/FieldWithLabel"; export function AddDescButton({ showDescription, setShowDescription, showMore, description, setDescription, buttonVariant, buttonColor, }: { showDescription: boolean; setShowDescription: (b: boolean) => void; showMore: boolean; description: string; setDescription: (d: string) => void; buttonVariant?: "text" | "outlined" | "contained"; buttonColor?: | "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning"; }) { const { t } = useI18n(); const theme = useTheme(); return ( <> {!showDescription && ( {!showMore ? ( ) : ( )} )} {showDescription && ( setDescription(e.target.value)} size="small" margin="dense" multiline minRows={2} maxRows={10} sx={{ "& .MuiInputBase-root": { maxHeight: "33%", overflowY: "auto", padding: 0, }, "& textarea": { resize: "vertical", }, }} /> )} ); }