Skip to content

Commit

Permalink
Fixed dashboard modal window overflow on mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLeChat committed Feb 23, 2024
1 parent 45813b1 commit ca3a751
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/[locale]/components/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default function Header( {
</NavigationMenuTrigger>

<NavigationMenuContent>
<ul className="grid w-full gap-3 p-4 md:w-[500px] lg:w-[800px] lg:grid-cols-[.75fr_1fr_1fr]">
<ul className="grid w-[250px] gap-3 p-4 sm:w-[400px] lg:w-[800px] lg:grid-cols-[.75fr_1fr_1fr]">
{/* Image d'illustration */}
<li className="row-span-3 max-lg:hidden">
<NavigationMenuLink
Expand Down
4 changes: 2 additions & 2 deletions app/[locale]/components/notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ export default function Notifications()
)}
</DialogTrigger>

<DialogContent className="h-fit max-h-full w-[380px] overflow-auto">
<DialogContent className="h-fit max-h-[calc(100%-2rem)] overflow-auto max-sm:max-w-[calc(100%-2rem)] md:h-3/4">
<DialogHeader>
<DialogTitle className="flex items-center">
<BellRing className="mr-2 inline h-5 w-5" />
Notifications
</DialogTitle>

<DialogDescription>
<DialogDescription className="text-left">
{unreadCount === 0
? "Vous n'avez aucune nouvelle notification."
: `Vous avez ${ unreadCount } nouvelle(s) notification(s).`}
Expand Down
2 changes: 1 addition & 1 deletion app/[locale]/dashboard/components/file-upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export default function FileUpload( {
</p>
</DialogTrigger>

<DialogContent className="h-fit max-h-full overflow-auto">
<DialogContent className="h-fit max-h-[calc(100%-2rem)] overflow-auto max-sm:max-w-[calc(100%-2rem)] md:max-h-[75%]">
<Form {...form}>
<form
action={async ( formData: FormData ) =>
Expand Down
12 changes: 6 additions & 6 deletions app/[locale]/dashboard/components/row-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export default function RowActions( {
</DropdownMenuItem>
</AlertDialogTrigger>

<AlertDialogContent>
<AlertDialogContent className="max-sm:max-w-[calc(100%-2rem)]">
<AlertDialogHeader>
<AlertDialogTitle>
<Globe className="mr-2 inline h-5 w-5 align-text-top" />
Expand Down Expand Up @@ -455,7 +455,7 @@ export default function RowActions( {
</DropdownMenuItem>
</AlertDialogTrigger>

<AlertDialogContent>
<AlertDialogContent className="max-sm:max-w-[calc(100%-2rem)]">
<AlertDialogHeader>
<AlertDialogTitle>
<FolderLock className="mr-2 inline h-5 w-5 align-text-top" />
Expand Down Expand Up @@ -534,7 +534,7 @@ export default function RowActions( {
</DropdownMenuItem>
</AlertDialogTrigger>

<AlertDialogContent>
<AlertDialogContent className="max-sm:max-w-[calc(100%-2rem)]">
<AlertDialogHeader>
<AlertDialogTitle>
<UserX className="mr-2 inline h-5 w-5 align-text-top" />
Expand Down Expand Up @@ -578,7 +578,7 @@ export default function RowActions( {
</DropdownMenuItem>
</DialogTrigger>

<DialogContent>
<DialogContent className="max-sm:max-w-[calc(100%-2rem)]">
<DialogHeader>
<DialogTitle>
<TextCursorInput className="mr-2 inline h-5 w-5 align-text-top" />
Expand Down Expand Up @@ -655,7 +655,7 @@ export default function RowActions( {
</DropdownMenuItem>
</DialogTrigger>

<DialogContent>
<DialogContent className="max-sm:max-w-[calc(100%-2rem)]">
<DialogHeader>
<DialogTitle>
<ShieldCheck className="mr-2 inline h-5 w-5 align-text-top" />
Expand Down Expand Up @@ -797,7 +797,7 @@ export default function RowActions( {
</DropdownMenuItem>
</AlertDialogTrigger>

<AlertDialogContent>
<AlertDialogContent className="max-sm:max-w-[calc(100%-2rem)]">
<AlertDialogHeader>
<AlertDialogTitle>
<Trash className="mr-2 inline h-5 w-5 align-text-top" />
Expand Down

0 comments on commit ca3a751

Please sign in to comment.