diff --git a/app/react/App/styles/globals.css b/app/react/App/styles/globals.css index 4c33cfd2f6..9f4a5353c7 100644 --- a/app/react/App/styles/globals.css +++ b/app/react/App/styles/globals.css @@ -1053,6 +1053,10 @@ input:checked + .toggle-bg { position: sticky; } +.inset-0 { + inset: 0px; +} + .inset-y-0 { top: 0px; bottom: 0px; @@ -1445,6 +1449,10 @@ input:checked + .toggle-bg { max-height: calc(100vh - 9rem); } +.max-h-screen { + max-height: 100vh; +} + .min-h-fit { min-height: -moz-fit-content; min-height: fit-content; @@ -5124,6 +5132,10 @@ input:checked + .toggle-bg { display: none; } + .md\:h-\[70vh\] { + height: 70vh; + } + .md\:h-auto { height: auto; } diff --git a/app/react/V2/Components/UI/Modal.tsx b/app/react/V2/Components/UI/Modal.tsx index 537ee4ef8f..96adad9ccf 100644 --- a/app/react/V2/Components/UI/Modal.tsx +++ b/app/react/V2/Components/UI/Modal.tsx @@ -21,14 +21,13 @@ const Modal = ({ children, size }: ModalProps) => { return (
-
-
{children}
+
+
{children}
); @@ -42,7 +41,7 @@ interface ModalChildrenProps { Modal.Header = ({ children, className }: ModalChildrenProps) => (
{children} @@ -50,7 +49,7 @@ Modal.Header = ({ children, className }: ModalChildrenProps) => ( ); Modal.Body = ({ children, className }: ModalChildrenProps) => ( -
+
{children}
); diff --git a/app/react/V2/Routes/Settings/Languages/LanguagesList.tsx b/app/react/V2/Routes/Settings/Languages/LanguagesList.tsx index aaa10dc2c7..e920085501 100644 --- a/app/react/V2/Routes/Settings/Languages/LanguagesList.tsx +++ b/app/react/V2/Routes/Settings/Languages/LanguagesList.tsx @@ -176,7 +176,7 @@ const LanguagesList = () => { {showModal && ( -
+
)} diff --git a/app/react/stories/ConfirmationModal.stories.tsx b/app/react/stories/ConfirmationModal.stories.tsx index 7ff52a7b27..f16e8f068a 100644 --- a/app/react/stories/ConfirmationModal.stories.tsx +++ b/app/react/stories/ConfirmationModal.stories.tsx @@ -26,7 +26,7 @@ const Primary: Story = { render: args => (
-
+
= { title: 'Components/Modal', @@ -14,9 +15,7 @@ type Story = StoryObj; const Primary: Story = { render: args => (
-
- {args.children} -
+ {args.children}
), }; @@ -60,7 +59,7 @@ const Warning = {

Are you sure you want to delete this product?

-
+
@@ -74,6 +73,29 @@ const Warning = { }, }; -export { Basic, Warning }; +const LargeContent = { + ...Primary, + args: { + children: ( + <> + +

Information modal

+ +
+ + + + + + + + ), + size: 'xxxl', + }, +}; + +export { Basic, Warning, LargeContent }; export default meta; diff --git a/app/react/stories/Sidepanel.stories.tsx b/app/react/stories/Sidepanel.stories.tsx index 28778cadab..b22196ac88 100644 --- a/app/react/stories/Sidepanel.stories.tsx +++ b/app/react/stories/Sidepanel.stories.tsx @@ -5,38 +5,13 @@ import { Provider } from 'react-redux'; import { LEGACY_createStore as createStore } from 'V2/shared/testingHelpers'; import { Sidepanel } from 'V2/Components/UI'; import { SidePanelProps } from 'app/V2/Components/UI/Sidepanel'; +import { GeneratedContent } from './helpers/GeneratedContent'; const meta: Meta = { title: 'Components/Sidepanel', component: Sidepanel, }; -const SidepanelContent = () => { - const contents: React.ReactNode[] = []; - - for (let index = 1; index < 8; index += 1) { - contents.push( - <> -

Item {index}

-

- Fusce id mi eu mauris bibendum dignissim nec in sem. Sed ultrices varius mauris quis - placerat. Donec imperdiet sodales diam sed imperdiet. Aenean a nisl venenatis lectus - mattis pellentesque. Duis fermentum ante a ultricies feugiat. Proin dapibus luctus purus - id viverra. Aenean a aliquet nibh. Aenean facilisis justo quis sem auctor, nec mollis - tortor placerat. Cras eget enim mollis, mollis risus gravida, pharetra risus. Mauris - dapibus malesuada mi, quis ornare felis imperdiet eget. Donec sed quam non dolor sodales - hendrerit. Aenean suscipit, velit sed laoreet cursus, ante odio tristique lectus, a porta - eros felis eu sem. Curabitur eu gravida dolor. Ut iaculis lacus vitae libero viverra - interdum. Phasellus ac est consectetur, malesuada nisl nec, blandit lorem. -

-
- - ); - } - - return <>{contents.map(content => content)}; -}; - const SidePanelContainer = (args: SidePanelProps) => { const [showSidepanel, setShowSidepanel] = useState(false); @@ -88,7 +63,7 @@ const SidePanelContainer = (args: SidePanelProps) => {
diff --git a/app/react/stories/helpers/GeneratedContent.tsx b/app/react/stories/helpers/GeneratedContent.tsx new file mode 100644 index 0000000000..854220f569 --- /dev/null +++ b/app/react/stories/helpers/GeneratedContent.tsx @@ -0,0 +1,30 @@ +import React from 'react'; + +const GeneratedContent = ({ rows }: { rows?: number }) => { + const maxRows = rows || 8; + const contents: React.ReactNode[] = []; + + for (let index = 1; index < maxRows; index += 1) { + contents.push( + <> +

Item {index}

+

+ Fusce id mi eu mauris bibendum dignissim nec in sem. Sed ultrices varius mauris quis + placerat. Donec imperdiet sodales diam sed imperdiet. Aenean a nisl venenatis lectus + mattis pellentesque. Duis fermentum ante a ultricies feugiat. Proin dapibus luctus purus + id viverra. Aenean a aliquet nibh. Aenean facilisis justo quis sem auctor, nec mollis + tortor placerat. Cras eget enim mollis, mollis risus gravida, pharetra risus. Mauris + dapibus malesuada mi, quis ornare felis imperdiet eget. Donec sed quam non dolor sodales + hendrerit. Aenean suscipit, velit sed laoreet cursus, ante odio tristique lectus, a porta + eros felis eu sem. Curabitur eu gravida dolor. Ut iaculis lacus vitae libero viverra + interdum. Phasellus ac est consectetur, malesuada nisl nec, blandit lorem. +

+
+ + ); + } + + return <>{contents.map(content => content)}; +}; + +export { GeneratedContent };