@@ -171,6 +171,7 @@ const VerticalDivider: React.FC<React.PropsWithChildren<DividerProps>> = ({varia
171171// PageLayout.Header
172172
173173export type PageLayoutHeaderProps = {
174+ padding ?: keyof typeof SPACING_MAP
174175 divider ?: 'none' | 'line' | ResponsiveValue < 'none' | 'line' , 'none' | 'line' | 'filled' >
175176 /**
176177 * @deprecated Use the `divider` prop with a responsive value instead.
@@ -191,6 +192,7 @@ export type PageLayoutHeaderProps = {
191192} & SxProp
192193
193194const Header : React . FC < React . PropsWithChildren < PageLayoutHeaderProps > > = ( {
195+ padding = 'none' ,
194196 divider = 'none' ,
195197 dividerWhenNarrow = 'inherit' ,
196198 hidden = false ,
@@ -219,7 +221,7 @@ const Header: React.FC<React.PropsWithChildren<PageLayoutHeaderProps>> = ({
219221 sx
220222 ) }
221223 >
222- { children }
224+ < Box sx = { { padding : SPACING_MAP [ padding ] } } > { children } </ Box >
223225 < HorizontalDivider variant = { dividerVariant } sx = { { marginTop : SPACING_MAP [ rowGap ] } } />
224226 </ Box >
225227 )
@@ -232,6 +234,7 @@ Header.displayName = 'PageLayout.Header'
232234
233235export type PageLayoutContentProps = {
234236 width ?: keyof typeof contentWidths
237+ padding ?: keyof typeof SPACING_MAP
235238 hidden ?: boolean | ResponsiveValue < boolean >
236239} & SxProp
237240
@@ -245,6 +248,7 @@ const contentWidths = {
245248
246249const Content : React . FC < React . PropsWithChildren < PageLayoutContentProps > > = ( {
247250 width = 'full' ,
251+ padding = 'none' ,
248252 hidden = false ,
249253 children,
250254 sx = { }
@@ -268,7 +272,9 @@ const Content: React.FC<React.PropsWithChildren<PageLayoutContentProps>> = ({
268272 sx
269273 ) }
270274 >
271- < Box sx = { { width : '100%' , maxWidth : contentWidths [ width ] , marginX : 'auto' } } > { children } </ Box >
275+ < Box sx = { { width : '100%' , maxWidth : contentWidths [ width ] , marginX : 'auto' , padding : SPACING_MAP [ padding ] } } >
276+ { children }
277+ </ Box >
272278 </ Box >
273279 )
274280}
@@ -296,6 +302,7 @@ export type PageLayoutPaneProps = {
296302 */
297303 positionWhenNarrow ?: 'inherit' | keyof typeof panePositions
298304 width ?: keyof typeof paneWidths
305+ padding ?: keyof typeof SPACING_MAP
299306 divider ?: 'none' | 'line' | ResponsiveValue < 'none' | 'line' , 'none' | 'line' | 'filled' >
300307 /**
301308 * @deprecated Use the `divider` prop with a responsive value instead.
@@ -330,6 +337,7 @@ const Pane: React.FC<React.PropsWithChildren<PageLayoutPaneProps>> = ({
330337 position = 'end' ,
331338 positionWhenNarrow = 'inherit' ,
332339 width = 'medium' ,
340+ padding = 'none' ,
333341 divider = 'none' ,
334342 dividerWhenNarrow = 'inherit' ,
335343 hidden = false ,
@@ -388,7 +396,7 @@ const Pane: React.FC<React.PropsWithChildren<PageLayoutPaneProps>> = ({
388396 sx = { { [ responsivePosition === 'end' ? 'marginRight' : 'marginLeft' ] : SPACING_MAP [ columnGap ] } }
389397 />
390398
391- < Box sx = { { width : paneWidths [ width ] } } > { children } </ Box >
399+ < Box sx = { { width : paneWidths [ width ] , padding : SPACING_MAP [ padding ] } } > { children } </ Box >
392400 </ Box >
393401 )
394402}
@@ -399,6 +407,7 @@ Pane.displayName = 'PageLayout.Pane'
399407// PageLayout.Footer
400408
401409export type PageLayoutFooterProps = {
410+ padding ?: keyof typeof SPACING_MAP
402411 divider ?: 'none' | 'line' | ResponsiveValue < 'none' | 'line' , 'none' | 'line' | 'filled' >
403412 /**
404413 * @deprecated Use the `divider` prop with a responsive value instead.
@@ -419,6 +428,7 @@ export type PageLayoutFooterProps = {
419428} & SxProp
420429
421430const Footer : React . FC < React . PropsWithChildren < PageLayoutFooterProps > > = ( {
431+ padding = 'none' ,
422432 divider = 'none' ,
423433 dividerWhenNarrow = 'inherit' ,
424434 hidden = false ,
@@ -448,7 +458,7 @@ const Footer: React.FC<React.PropsWithChildren<PageLayoutFooterProps>> = ({
448458 ) }
449459 >
450460 < HorizontalDivider variant = { dividerVariant } sx = { { marginBottom : SPACING_MAP [ rowGap ] } } />
451- { children }
461+ < Box sx = { { padding : SPACING_MAP [ padding ] } } > { children } </ Box >
452462 </ Box >
453463 )
454464}
0 commit comments