diff --git a/.changeset/fix-modalPadding.md b/.changeset/fix-modalPadding.md new file mode 100644 index 000000000..e9e70eede --- /dev/null +++ b/.changeset/fix-modalPadding.md @@ -0,0 +1,5 @@ +--- +'react-magma-dom': patch +--- + +fix(Modal): Fixed bottom padding on the Modal header. diff --git a/packages/react-magma-dom/src/components/Modal/Modal.stories.tsx b/packages/react-magma-dom/src/components/Modal/Modal.stories.tsx index 4608706b4..232207001 100644 --- a/packages/react-magma-dom/src/components/Modal/Modal.stories.tsx +++ b/packages/react-magma-dom/src/components/Modal/Modal.stories.tsx @@ -9,6 +9,7 @@ import { DatePicker } from '../DatePicker'; import { ButtonGroup, ButtonGroupAlignment } from '../ButtonGroup'; import { Container } from '../Container'; import { NativeSelect } from '../NativeSelect'; +import { Paragraph } from '../Paragraph'; import { Spacer } from '../Spacer'; import { Combobox } from '../Combobox'; import { @@ -40,7 +41,7 @@ export const Default = () => { }} isOpen={showModal} > -

This is a modal, doing modal things.

+ This is a modal, doing modal things. @@ -70,11 +71,11 @@ export const LongContentWithScrolling = () => { return ( <> -

This is a modal, doing modal things.

-

+ This is a modal, doing modal things. + This is linked text in the modal -

-

+ + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut @@ -82,12 +83,12 @@ export const LongContentWithScrolling = () => { reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-

This is a modal, doing modal things.

-

+ + This is a modal, doing modal things. + This is some more linked text in the modal -

-

+ + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut @@ -95,12 +96,12 @@ export const LongContentWithScrolling = () => { reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-

This is a modal, doing modal things.

-

+ + This is a modal, doing modal things. + -

-

+ + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut @@ -108,7 +109,7 @@ export const LongContentWithScrolling = () => { reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

+
} + @@ -210,11 +212,11 @@ export const ModalContentUpdate = () => { {page === 2 && ( <> -

Page two

-

+ Page two + {' '} -

+ )} @@ -248,11 +250,13 @@ export const NoHeaderOrFocusableContent = () => { onClose={onModalNoFocusClose} isOpen={showModalNoFocus} > -

This modal has no header and nothing focusable.

-

+ + This modal has no header and nothing focusable. + + Consider the usability implications before implementing a modal like this. A modal should have something actionable inside it. -

+ -

-

+ + This is some more linked text in the modal -

+ { ]} isClearable /> -

+ -

+ -

+ -

-

+ + This is some more linked text in the modal -

+
@@ -176,7 +188,7 @@ export function Example() { }} isOpen={showModalHeader} > -

This modal has no header.

+ This modal has no header. @@ -202,7 +214,7 @@ The close button can be hidden by using the `isCloseButtonHidden` prop. If this ```tsx import React from 'react'; -import { Button, Modal } from 'react-magma-dom'; +import { Button, Modal, Paragraph } from 'react-magma-dom'; export function Example() { const [showModal, setShowModal] = React.useState(false); const buttonRef = React.useRef(); @@ -218,7 +230,9 @@ export function Example() { }} isOpen={showModal} > -

The standard modal close button is hidden.

+ + The standard modal close button is hidden. + -

+ Magma Close Called Times: {magmaCloseCalledTimes} -

-

+ + Internal Close Called Times: {internalCloseCalledTimes} -

+ @@ -281,7 +295,13 @@ Although we don't recommend using nested modals, the ability for one nested moda ```tsx import React from 'react'; -import { Button, Modal, ModalSize, VisuallyHidden } from 'react-magma-dom'; +import { + Button, + Modal, + ModalSize, + Paragraph, + VisuallyHidden, +} from 'react-magma-dom'; export function Example() { const [showModal, setShowModal] = React.useState(false); const [showModal2, setShowModal2] = React.useState(false); @@ -295,7 +315,7 @@ export function Example() { }} isOpen={showModal} > -

This is a modal, doing modal things.

+ This is a modal, doing modal things. @@ -309,7 +329,7 @@ export function Example() { onClose={() => setShowModal2(false)} isOpen={showModal2} > -

This is modal 2

+ This is modal 2 ); @@ -324,6 +344,7 @@ import { Button, Hyperlink, Modal, + Paragraph, VisuallyHidden, Card, CardBody, @@ -343,24 +364,26 @@ export function Example() { isOpen={showModal} isInverse > -

This is a modal, doing modal things.

-

+ + This is a modal, doing modal things. + + This is{' '} linked text {' '} in the modal -

-

+ + -

-

+ + This is{' '} some more linked text {' '} in the modal -

+