Skip to content

Commit

Permalink
Nesting multiple Containers will not increase the padding, will only …
Browse files Browse the repository at this point in the history
…be applied once.
  • Loading branch information
paales committed Jan 16, 2025
1 parent 590f064 commit 32bccbb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-buckets-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/next-ui': patch
---

Nesting multiple Containers will not increase the padding, will only be applied once.
3 changes: 3 additions & 0 deletions packages/next-ui/Container/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ export const Container = React.forwardRef(
pr: !breakoutRight ? padding : undefined,
'&.breakoutLeft': { pl: 'unset' },
'&.breakoutRight': { pr: 'unset' },

// Nesting containers will not have padding applied.
'.MuiContainer-root &': { pl: 0, pr: 0 },
},
...(Array.isArray(sx) ? sx : [sx]),
]}
Expand Down

0 comments on commit 32bccbb

Please sign in to comment.