Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: mobile modal button visible #138

Merged
merged 8 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
15 changes: 11 additions & 4 deletions src/overlays/Modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,22 @@
width: auto;
}

max-height: 100vh;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already set on lines 37 + 38 by the variables

max-width: 100vw;
@media (min-width: $screen-md) {
max-height: calc(100vh - var(--bloom-s6));
max-width: calc(100vw - var(--bloom-s6));
}
@supports (max-height: 100dvh) {
--max-height: 100dvh;
}
@supports not (max-height: 100dvh) {
@media (max-width: $screen-sm) {
padding-bottom: var(--bloom-s20);
border: none;
box-shadow: none;
background-clip: content-box;
}
}
}

.modal__header {
min-height: var(--modal-header-min-height);
}
Expand Down Expand Up @@ -147,4 +155,3 @@
--modal-margin-top: var(--bloom-s6);
}
}

24 changes: 0 additions & 24 deletions src/overlays/Modal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,30 +254,6 @@ export const ScrollableModalMinimalContent = () => {
)
}

export const TransparentOverlayModal = () => (
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talking with Emily, we determined this story was not representative or realistic so it's removed here

<Modal
open={true}
title={text("Title", "Modal Title")}
ariaDescription={text("Aria Description", "Modal Description")}
hideCloseIcon={true}
actions={[
<Button
size={AppearanceSizeType.small}
onClick={noop}
styleType={AppearanceStyleType.primary}
>
{text("Action 2 Label", "Submit")}
</Button>,
<Button size={AppearanceSizeType.small} onClick={noop}>
{text("Action 1 Label", "Cancel")}
</Button>,
]}
backdrop={false}
>
{text("Content", "Modal Content")}
</Modal>
)

export const ManyButtons = () => {
const [openModal, setOpenModal] = useState(false)

Expand Down
3 changes: 3 additions & 0 deletions src/overlays/Overlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
--overlay-background-color: var(--bloom-color-gray-950);
--overlay-opacity: 0.5;
--overlay-height: 100vh;
@supports (height: 100dvh) {
--overlay-height: 100dvh;
}

position: fixed;
display: flex;
Expand Down