Skip to content

Commit 91b52f7

Browse files
authored
DialogV2: Move DialogOverflowWrapper class (#5811)
1 parent 769a048 commit 91b52f7

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.changeset/brown-ducks-lick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': patch
3+
---
4+
5+
DialogV2: Fix CSS issue where `flex-grow` wasn't getting applied via classname

packages/react/src/Dialog/Dialog.module.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@
6565
justify-content: flex-end;
6666
}
6767

68-
.DialogOverflowWrapper {
69-
flex-grow: 1;
70-
}
71-
7268
@media (max-width: 767px) {
7369
&[data-position-narrow='center'] {
7470
align-items: center;
@@ -212,6 +208,10 @@
212208
}
213209
}
214210

211+
.DialogOverflowWrapper {
212+
flex-grow: 1;
213+
}
214+
215215
.Header {
216216
z-index: 1;
217217
padding: var(--base-size-8);

packages/react/src/Dialog/Dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ const _Dialog = React.forwardRef<HTMLDivElement, React.PropsWithChildren<DialogP
527527
className={clsx(className, enabled && classes.Dialog)}
528528
>
529529
{header}
530-
<ScrollableRegion aria-labelledby={dialogLabelId} className="DialogOverflowWrapper">
530+
<ScrollableRegion aria-labelledby={dialogLabelId} className={classes.DialogOverflowWrapper}>
531531
{body}
532532
</ScrollableRegion>
533533
{footer}

0 commit comments

Comments
 (0)