infoalloggi-monorepo/apps/infoalloggi/src/components/annuncio-interactions/contatto_modal.tsx
Marco Pedone 6ad74c9002 Refactor and enhance UI components across the application
- Renamed `AnnunciInConferma` to `AnnunciInConfermaDialog` and `AnnunciSelezionati` to `AnnunciSelezionatiDialog` for clarity.
- Simplified button notifications for announcements by always displaying the count.
- Introduced `AnnunciInConfermaAccordion` and `AnnunciSelezionatiAccordion` components to manage accordion behavior for announcements.
- Updated button styles to remove unnecessary flex properties for better alignment.
- Improved form validation logic in `FormNewServizioAcquisto` for better clarity and performance.
- Enhanced the `UploadModal` to accept props directly, simplifying the component structure.
- Added a new `CardAnnuncio` component for displaying announcements with improved layout and functionality.
- Updated global styles to include a new background color variable.
- Refactored API routes and controllers for better clarity and maintainability.
- Cleaned up various components by removing redundant class names and improving accessibility.
2025-11-03 10:59:45 +01:00

38 lines
1.1 KiB
TypeScript

import { MessageCircleQuestion } from "lucide-react";
import {
Credenza,
CredenzaBody,
CredenzaContent,
CredenzaDescription,
CredenzaHeader,
CredenzaTitle,
CredenzaTrigger,
} from "~/components/custom_ui/credenza";
import { Button } from "~/components/ui/button";
import { FormContattoAnnucio } from "~/forms/FormContattoAnnuncio";
import { useAnnuncio } from "~/providers/AnnuncioProvider";
export const ContattoAnnuncio = () => {
const { codice } = useAnnuncio();
return (
<Credenza>
<CredenzaTrigger asChild>
<Button className="w-full" variant="destructive">
<MessageCircleQuestion className="size-6" /> Contattaci
</Button>
</CredenzaTrigger>
<CredenzaContent className="max-h-[90vh]">
<CredenzaHeader>
<CredenzaTitle>Contattaci per avere informazioni</CredenzaTitle>
<CredenzaDescription>
Ti contatteremo il prima possibile per darti più informazioni
</CredenzaDescription>
</CredenzaHeader>
<CredenzaBody className="max-h-[80vh] overflow-auto pb-5">
<FormContattoAnnucio codice={codice} />
</CredenzaBody>
</CredenzaContent>
</Credenza>
);
};