-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(candidate): added a decision button leading to the drop out deci…
…sion page to the drop out warning
- Loading branch information
Showing
3 changed files
with
43 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 26 additions & 14 deletions
40
packages/reva-candidate/src/app/_components/drop-out-warning/DropOutWarning.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,43 @@ | ||
import { format } from "date-fns"; | ||
import fvaeWarning from "./assets/fvae_warning.png"; | ||
import Image from "next/image"; | ||
import Button from "@codegouvfr/react-dsfr/Button"; | ||
|
||
export const DropOutWarning = ({ | ||
dropOutDate, | ||
className, | ||
onDecisionButtonClick, | ||
}: { | ||
dropOutDate: Date; | ||
className?: string; | ||
onDecisionButtonClick?: () => void; | ||
}) => ( | ||
<div | ||
data-test="drop-out-warning" | ||
className={`flex flex-col gap-4 md:gap-0 md:flex-row items-center min-h-[160px] ${className || ""}`} | ||
className={`flex flex-col ${className || ""}`} | ||
> | ||
<Image | ||
className="z-10" | ||
alt="main levée devant un panneau d'interdiction" | ||
style={{ | ||
width: "132px", | ||
height: "154px", | ||
}} | ||
src={fvaeWarning} | ||
/> | ||
<div className="md:-ml-16 p-6 md:pl-24 border-b-4 border-fvae-hard-red shadow-[0px_6px_18px_0px_rgba(0,0,18,0.16)]"> | ||
Votre accompagnateur a déclaré l’abandon de votre parcours VAE le{" "} | ||
{format(dropOutDate, "dd/MM/yyyy")}. Vous avez 6 mois pour enregistrer | ||
votre décision : accepter l’abandon ou continuer votre parcours. | ||
<div className="flex flex-col gap-4 md:gap-0 md:flex-row items-center min-h-[160px]"> | ||
<Image | ||
className="z-10" | ||
alt="main levée devant un panneau d'interdiction" | ||
style={{ | ||
width: "132px", | ||
height: "154px", | ||
}} | ||
src={fvaeWarning} | ||
/> | ||
<div className="md:-ml-16 p-6 md:pl-24 border-b-4 border-fvae-hard-red shadow-[0px_6px_18px_0px_rgba(0,0,18,0.16)]"> | ||
Votre accompagnateur a déclaré l’abandon de votre parcours VAE le{" "} | ||
{format(dropOutDate, "dd/MM/yyyy")}. Vous avez 6 mois pour enregistrer | ||
votre décision : accepter l’abandon ou continuer votre parcours. | ||
</div> | ||
</div> | ||
<Button | ||
data-test="drop-out-warning-decision-button" | ||
className="ml-auto -mt-3" | ||
onClick={onDecisionButtonClick} | ||
> | ||
Enregistrer ma décision | ||
</Button> | ||
</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters