File tree Expand file tree Collapse file tree 6 files changed +22
-5
lines changed
Expand file tree Collapse file tree 6 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ function Page( {
1717 children,
1818 className,
1919 actions,
20+ hasPadding = false ,
2021} : {
2122 breadcrumbs ?: React . ReactNode ;
2223 badges ?: React . ReactNode ;
@@ -40,7 +41,13 @@ function Page( {
4041 actions = { actions }
4142 />
4243 ) }
43- { children }
44+ { hasPadding ? (
45+ < div className = "admin-ui-page__content has-padding" >
46+ { children }
47+ </ div >
48+ ) : (
49+ children
50+ ) }
4451 </ NavigableRegion >
4552 ) ;
4653}
Original file line number Diff line number Diff line change 3232 margin : 0 ;
3333}
3434
35+ .admin-ui-page__content {
36+ flex-grow : 1 ;
37+ overflow : auto ;
38+ display : flex ;
39+ flex-direction : column ;
40+
41+ & .has-padding {
42+ padding : $grid-unit-20 $grid-unit * 2.5 ;
43+ @container (max-width : 430px ) {
44+ padding : $grid-unit-20 $grid-unit-30 ;
45+ }
46+ }
47+ }
48+
3549// Show button text labels when preference is enabled.
3650.show-icon-labels {
3751 .admin-ui-page__header-actions {
Original file line number Diff line number Diff line change @@ -217,7 +217,6 @@ export default function DataviewsPatterns() {
217217 < PatternsActions />
218218 </ >
219219 }
220- hasPadding = { false }
221220 >
222221 < DataViews
223222 key = { categoryId + postType }
Original file line number Diff line number Diff line change @@ -254,7 +254,6 @@ export default function PageTemplates() {
254254 < AddNewTemplate />
255255 </ >
256256 }
257- hasPadding = { false }
258257 >
259258 < DataViews
260259 key = { activeView }
Original file line number Diff line number Diff line change @@ -254,7 +254,6 @@ export default function PostList( { postType } ) {
254254 ) }
255255 </ >
256256 }
257- hasPadding = { false }
258257 >
259258 < DataViews
260259 key = { activeView }
Original file line number Diff line number Diff line change @@ -132,7 +132,6 @@ export default function GlobalStylesUIWrapper() {
132132 }
133133 className = "edit-site-styles"
134134 title = { __ ( 'Styles' ) }
135- hasPadding = { false }
136135 >
137136 < GlobalStylesUI path = { section } onPathChange = { onChangeSection } />
138137 </ Page >
You can’t perform that action at this time.
0 commit comments