Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/modal-mobile-viewport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"flowbite-react": patch
---

fix(modal): resolve mobile viewport height and centering issues

Replace `h-screen` with `h-full` and add `flex flex-col` to modal
content for proper layout on mobile viewports.
4 changes: 2 additions & 2 deletions packages/ui/src/components/Modal/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { ModalTheme } from "./Modal";

export const modalTheme = createTheme<ModalTheme>({
root: {
base: "fixed inset-x-0 top-0 z-50 h-screen overflow-y-auto overflow-x-hidden md:inset-0 md:h-full",
base: "fixed inset-x-0 top-0 z-50 h-full overflow-y-auto overflow-x-hidden md:inset-0 md:h-full",
show: {
on: "flex bg-gray-900/50 dark:bg-gray-900/80",
off: "hidden",
Expand Down Expand Up @@ -33,7 +33,7 @@ export const modalTheme = createTheme<ModalTheme>({
},
},
content: {
base: "relative h-full w-full p-4 md:h-auto",
base: "relative flex h-full w-full flex-col p-4 md:h-auto",
inner: "relative flex max-h-[90dvh] flex-col rounded-lg bg-white shadow dark:bg-gray-700",
},
body: {
Expand Down
Loading