From aa0bce67696cfe4aa6cefbe1dd6b105815d311f2 Mon Sep 17 00:00:00 2001 From: Lance Gliser Date: Wed, 6 Nov 2024 12:36:21 -0600 Subject: [PATCH] 22108: Updated Modal.Header to prevent overflow (#68) --- .../Surfaces/Modal/Modal.stories.tsx | 27 +++++++++++++++++-- src/themes/standard.ts | 5 ++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/components/Surfaces/Modal/Modal.stories.tsx b/src/components/Surfaces/Modal/Modal.stories.tsx index b8916a8..c31619f 100644 --- a/src/components/Surfaces/Modal/Modal.stories.tsx +++ b/src/components/Surfaces/Modal/Modal.stories.tsx @@ -1,5 +1,6 @@ import type { Meta, StoryObj } from "@storybook/react"; import { Modal } from "flowbite-react"; +import { Paragraph } from "../../Typography"; // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export const meta: Meta = { @@ -14,14 +15,36 @@ const meta: Meta = { argTypes: {}, render: (args) => ( <> -
+
{new Array(100).fill(0).map((_, index) => (
{index}
))}
+ +
+
+ Lorem, ipsum dolor sit amet consectetur adipisicing elit +
+
+ Nulla similique impedit natus nesciunt repellendus quaerat + exercitationem +
+
+
-

Sample content

+ + Lorem ipsum dolor sit amet consectetur adipisicing elit. Nulla + similique impedit natus nesciunt repellendus quaerat exercitationem + incidunt dolorum neque sit? Mollitia molestias totam nam nostrum + magnam veniam ipsam aspernatur quas. + + + Lorem ipsum dolor sit amet consectetur adipisicing elit. Nulla + similique impedit natus nesciunt repellendus quaerat exercitationem + incidunt dolorum neque sit? Mollitia molestias totam nam nostrum + magnam veniam ipsam aspernatur quas. +
diff --git a/src/themes/standard.ts b/src/themes/standard.ts index eac3f23..3cdb78c 100644 --- a/src/themes/standard.ts +++ b/src/themes/standard.ts @@ -191,6 +191,11 @@ export const standardFlowbiteTheme: CustomFlowbiteTheme = { on: "flex bg-gray-900 bg-opacity-50 dark:bg-opacity-80 backdrop-blur-sm starting-fade", }, }, + header: { + base: "flex items-start justify-between rounded-t border-b p-5 dark:border-gray-600 overflow-hidden", + title: + "text-xl font-medium text-gray-900 dark:text-white overflow-hidden", + }, content: { base: "relative h-full w-full p-4 md:h-auto starting-fade", },