Skip to content

Commit c3c08ac

Browse files
committed
Adjust modal widths globally
- Set width to 100% (mobile first approach) - Set max-width to 39rem - This is based on Figma designs for report package modal, but looks like a pretty good default value for other modals as well - If needed, modals can override this value with local CSS, like is done for login button modal - Set max-width to 15rem. The value is selected totally arbitrarily. The intent is for the modal to break less on very narrow screens. We might want to rethink the modal implementation from mobile first perspective separately, to e.g. have less padding on mobile where the screen estate is limited - How well these changes work on modals on package wiki page couldn't be confirmed as the feature is currently very much broken
1 parent 6e2d678 commit c3c08ac

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

apps/cyberstorm-remix/app/commonComponents/Navigation/Navigation.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,15 @@
134134
color: var(--color-text-tertiary);
135135
}
136136

137+
.navigation-login__modal {
138+
max-width: min-content;
139+
}
140+
137141
.navigation-login {
138142
display: flex;
139143
flex-direction: column;
140144
gap: 2rem;
141145
align-items: center;
142-
width: min-content;
143146
padding: var(--space-32);
144147
}
145148

apps/cyberstorm-remix/app/commonComponents/Navigation/Navigation.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ export function DesktopLoginPopover() {
246246
Log In
247247
</NewButton>
248248
}
249+
contentClasses="navigation-login__modal"
249250
>
250251
<div className="navigation-login">
251252
<svg

apps/cyberstorm-remix/app/p/components/ReportPackage/ReportPackageModal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export function ReportPackageModal(props: ReportPackageModalProps) {
1212
return (
1313
<Modal
1414
titleContent="Report Package"
15-
csSize="small"
1615
disableBody
1716
open={props.isOpen}
1817
onOpenChange={props.onOpenChange}

packages/cyberstorm/src/newComponents/Modal/Modal.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
align-self: stretch;
2323
justify-content: center;
2424

25+
width: 100%;
26+
min-width: 15rem;
27+
max-width: 39rem;
28+
2529
/* padding: var(--modal-content-padding); */
2630
border: var(--modal-border);
2731
border-radius: var(--modal-border-radius);

0 commit comments

Comments
 (0)