Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .changeset/angry-wombats-burn.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Add maxWidth to container of PageLayout.{Pane, Content}
2 changes: 1 addition & 1 deletion src/PageLayout/PageLayout.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,7 +98,7 @@ const Root: React.FC<React.PropsWithChildren<PageLayoutProps>> = ({
return (
<>
{slots.Header}
<Box sx={{display: 'flex', flex: '1 1 100%', flexWrap: 'wrap'}}>{children}</Box>
<Box sx={{display: 'flex', flex: '1 1 100%', flexWrap: 'wrap', maxWidth: '100%'}}>{children}</Box>
{slots.Footer}
</>
)
Expand Down
4 changes: 4 additions & 0 deletions src/PageLayout/__snapshots__/PageLayout.test.tsx.snap
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,6 +25,7 @@ exports[`PageLayout renders condensed layout 1`] = `
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
max-width: 100%;
}

.c6 {
Expand DownExpand Up@@ -265,6 +266,7 @@ exports[`PageLayout renders default layout 1`] = `
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
max-width: 100%;
}

.c6 {
Expand DownExpand Up@@ -547,6 +549,7 @@ exports[`PageLayout renders pane in different position when narrow 1`] = `
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
max-width: 100%;
}

.c6 {
Expand DownExpand Up@@ -829,6 +832,7 @@ exports[`PageLayout renders with dividers 1`] = `
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
max-width: 100%;
}

.c6 {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,6 +29,7 @@ exports[`SplitPageLayout renders default layout 1`] = `
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
max-width: 100%;
}

.c6 {
Expand Down