diff --git a/packages/fuselage/src/components/Modal/Modal.stories.tsx b/packages/fuselage/src/components/Modal/Modal.stories.tsx index 05b1972a98..7cb6ff38e3 100644 --- a/packages/fuselage/src/components/Modal/Modal.stories.tsx +++ b/packages/fuselage/src/components/Modal/Modal.stories.tsx @@ -136,3 +136,35 @@ export const _WithAnnotation = () => ( ); + +export const _WithHeroImage = () => ( + + + + Modal Header + + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse non + urna posuere, tempor urna nec, lacinia lacus. Vivamus ac lobortis arcu. + Morbi malesuada, diam sed congue aliquet, dui elit tincidunt leo, a + fermentum ante augue nec ex. Vestibulum feugiat aliquam sem vel porta. + Praesent varius aliquet consequat. Mauris id nisl egestas, egestas ipsum + sit amet, vestibulum elit. Cras vel dapibus lacus. Sed congue interdum + lobortis. In vitae consectetur enim, eu varius leo. Quisque rhoncus nulla + a rhoncus lobortis. Sed eu nulla libero. Donec lacus ante, vehicula eget + eros molestie, ullamcorper tincidunt arcu. Suspendisse eget pulvinar + lacus. + + + + + + + + +); diff --git a/packages/fuselage/src/components/Modal/Modal.styles.scss b/packages/fuselage/src/components/Modal/Modal.styles.scss index 59589e54b8..8370d7a838 100644 --- a/packages/fuselage/src/components/Modal/Modal.styles.scss +++ b/packages/fuselage/src/components/Modal/Modal.styles.scss @@ -69,6 +69,14 @@ $modal-margin: theme('modal-margin', auto); @include typography.use-font-scale(c2); } + &__hero-image { + width: 100%; + height: auto; + max-height: lengths.size(256); + margin-bottom: lengths.size(24); + object-fit: contain; + } + &__backdrop { position: fixed; diff --git a/packages/fuselage/src/components/Modal/ModalHeroImage.tsx b/packages/fuselage/src/components/Modal/ModalHeroImage.tsx new file mode 100644 index 0000000000..ebd62a5a6e --- /dev/null +++ b/packages/fuselage/src/components/Modal/ModalHeroImage.tsx @@ -0,0 +1,10 @@ +import type { ComponentProps } from 'react'; +import React from 'react'; + +import Box from '../Box'; + +export type ModalHeroImageProps = ComponentProps; + +export const ModalHeroImage = ({ ...props }: ModalHeroImageProps) => ( + +); diff --git a/packages/fuselage/src/components/Modal/index.ts b/packages/fuselage/src/components/Modal/index.ts index 37eaf56d85..5f69fb1645 100644 --- a/packages/fuselage/src/components/Modal/index.ts +++ b/packages/fuselage/src/components/Modal/index.ts @@ -7,6 +7,7 @@ import { ModalFooterAnnotation } from './ModalFooterAnnotation'; import { ModalFooterControllers } from './ModalFooterControllers'; import { ModalHeader } from './ModalHeader'; import { ModalHeaderText } from './ModalHeaderText'; +import { ModalHeroImage } from './ModalHeroImage'; import { ModalIcon } from './ModalIcon'; import { ModalTagline } from './ModalTagline'; import { ModalThumb } from './ModalThumb'; @@ -24,6 +25,7 @@ export default Object.assign(Modal, { Title: ModalTitle, Tagline: ModalTagline, HeaderText: ModalHeaderText, + HeroImage: ModalHeroImage, FooterControllers: ModalFooterControllers, FooterAnnotation: ModalFooterAnnotation, }); @@ -39,6 +41,7 @@ export { ModalIcon, ModalTagline, ModalHeaderText, + ModalHeroImage, ModalFooterControllers, ModalFooterAnnotation, };