@@ -2,9 +2,10 @@ import React from 'react'
2
2
import type { Meta , StoryFn } from '@storybook/react-vite'
3
3
import { PageLayout } from './PageLayout'
4
4
import { Placeholder } from '../Placeholder'
5
- import { ActionList , Box , Breadcrumbs , Button , Flash , LinkButton , NavList } from '..'
5
+ import { ActionList , Breadcrumbs , Button , Flash , LinkButton , NavList } from '..'
6
6
import { ArrowLeftIcon , FilterIcon } from '@primer/octicons-react'
7
7
import { Dialog } from '../experimental'
8
+ import classes from './PageLayout.examples.stories.module.css'
8
9
9
10
export default {
10
11
title : 'Components/PageLayout/Examples' ,
@@ -32,14 +33,7 @@ export const ParentDetail: StoryFn = () => {
32
33
33
34
return (
34
35
< >
35
- < Flash
36
- sx = { {
37
- display : 'none' ,
38
- '@media screen and (min-width: 768px)' : {
39
- display : 'block' ,
40
- } ,
41
- } }
42
- >
36
+ < Flash className = { classes . ResponsiveFlash } >
43
37
Resize your browser window to see the responsive behavior of the parent-detail pattern.
44
38
</ Flash >
45
39
< PageLayout containerWidth = "full" >
@@ -135,14 +129,7 @@ export const ParentDetailBreadcrumb: StoryFn = () => {
135
129
136
130
return (
137
131
< >
138
- < Flash
139
- sx = { {
140
- display : 'none' ,
141
- '@media screen and (min-width: 768px)' : {
142
- display : 'block' ,
143
- } ,
144
- } }
145
- >
132
+ < Flash className = { classes . ResponsiveFlash } >
146
133
Resize your browser window to see the responsive behavior of the parent-detail pattern.
147
134
</ Flash >
148
135
< PageLayout containerWidth = "full" >
@@ -153,7 +140,7 @@ export const ParentDetailBreadcrumb: StoryFn = () => {
153
140
wide : true ,
154
141
} }
155
142
>
156
- < Box display = "flex" alignItems = "center" justifyContent = "space-between" >
143
+ < div className = { classes . BreadcrumbHeaderRow } >
157
144
< Breadcrumbs >
158
145
< Breadcrumbs . Item href = "#index" > Pages</ Breadcrumbs . Item >
159
146
< Breadcrumbs . Item
@@ -167,7 +154,7 @@ export const ParentDetailBreadcrumb: StoryFn = () => {
167
154
{ ! currentHash || currentHash === '#index' || currentHash === '#fruits' ? (
168
155
< LinkButton href = "#new-fruit" > New fruit</ LinkButton >
169
156
) : null }
170
- </ Box >
157
+ </ div >
171
158
</ PageLayout . Header >
172
159
< PageLayout . Pane
173
160
position = "start"
@@ -238,14 +225,7 @@ export const FilterBottomSheet: StoryFn = () => {
238
225
239
226
return (
240
227
< >
241
- < Flash
242
- sx = { {
243
- display : 'none' ,
244
- '@media screen and (min-width: 768px)' : {
245
- display : 'block' ,
246
- } ,
247
- } }
248
- >
228
+ < Flash className = { classes . ResponsiveFlash } >
249
229
Resize your browser window to see the responsive behavior of the filter sidebar pattern.
250
230
</ Flash >
251
231
@@ -328,14 +308,7 @@ export const FilterActionMenu: StoryFn = () => {
328
308
329
309
return (
330
310
< >
331
- < Flash
332
- sx = { {
333
- display : 'none' ,
334
- '@media screen and (min-width: 768px)' : {
335
- display : 'block' ,
336
- } ,
337
- } }
338
- >
311
+ < Flash className = { classes . ResponsiveFlash } >
339
312
Resize your browser window to see the responsive behavior of the filter sidebar pattern.
340
313
</ Flash >
341
314
@@ -551,14 +524,7 @@ export const FiltersBottomSheetTwoLevels: StoryFn = () => {
551
524
552
525
return (
553
526
< >
554
- < Flash
555
- sx = { {
556
- display : 'none' ,
557
- '@media screen and (min-width: 768px)' : {
558
- display : 'block' ,
559
- } ,
560
- } }
561
- >
527
+ < Flash className = { classes . ResponsiveFlash } >
562
528
Resize your browser window to see the responsive behavior of the filter sidebar pattern.
563
529
</ Flash >
564
530
@@ -655,14 +621,7 @@ export const FiltersBottomSheetTwoLevels: StoryFn = () => {
655
621
Animals
656
622
</ NavList . Item >
657
623
</ NavList >
658
- < Box
659
- sx = { {
660
- display : 'none' ,
661
- '@media (min-width: 768px)' : {
662
- display : 'block' ,
663
- } ,
664
- } }
665
- >
624
+ < div className = { classes . ResponsiveBox } >
666
625
< ActionList >
667
626
< ActionList . Group selectionVariant = "single" >
668
627
< ActionList . GroupHeading as = "h4" > Filters</ ActionList . GroupHeading >
@@ -692,7 +651,7 @@ export const FiltersBottomSheetTwoLevels: StoryFn = () => {
692
651
</ ActionList . Item >
693
652
</ ActionList . Group >
694
653
</ ActionList >
695
- </ Box >
654
+ </ div >
696
655
</ PageLayout . Pane >
697
656
< PageLayout . Content
698
657
hidden = { {
@@ -1057,14 +1016,7 @@ export const ParentDetailPlusFilters: StoryFn = () => {
1057
1016
1058
1017
return (
1059
1018
< >
1060
- < Flash
1061
- sx = { {
1062
- display : 'none' ,
1063
- '@media screen and (min-width: 768px)' : {
1064
- display : 'block' ,
1065
- } ,
1066
- } }
1067
- >
1019
+ < Flash className = { classes . ResponsiveFlash } >
1068
1020
Resize your browser window to see the responsive behavior of the sidebar patterns.
1069
1021
</ Flash >
1070
1022
@@ -1076,7 +1028,7 @@ export const ParentDetailPlusFilters: StoryFn = () => {
1076
1028
wide : true ,
1077
1029
} }
1078
1030
>
1079
- < Box sx = { { display : 'flex' , justifyContent : 'space-between' } } >
1031
+ < div className = { classes . HeaderRow } >
1080
1032
< LinkButton href = { generateHref ( '#index' ) } leadingVisual = { ArrowLeftIcon } variant = "invisible" >
1081
1033
Categories
1082
1034
</ LinkButton >
@@ -1114,7 +1066,7 @@ export const ParentDetailPlusFilters: StoryFn = () => {
1114
1066
</ ActionList >
1115
1067
</ Dialog >
1116
1068
) }
1117
- </ Box >
1069
+ </ div >
1118
1070
</ PageLayout . Header >
1119
1071
< PageLayout . Pane
1120
1072
position = "start"
@@ -1147,14 +1099,7 @@ export const ParentDetailPlusFilters: StoryFn = () => {
1147
1099
Animals
1148
1100
</ NavList . Item >
1149
1101
</ NavList >
1150
- < Box
1151
- sx = { {
1152
- display : 'none' ,
1153
- '@media (min-width: 768px)' : {
1154
- display : 'block' ,
1155
- } ,
1156
- } }
1157
- >
1102
+ < div className = { classes . ResponsiveBox } >
1158
1103
< ActionList >
1159
1104
< ActionList . Group selectionVariant = "single" >
1160
1105
< ActionList . GroupHeading as = "h4" > Filters</ ActionList . GroupHeading >
@@ -1184,7 +1129,7 @@ export const ParentDetailPlusFilters: StoryFn = () => {
1184
1129
</ ActionList . Item >
1185
1130
</ ActionList . Group >
1186
1131
</ ActionList >
1187
- </ Box >
1132
+ </ div >
1188
1133
</ PageLayout . Pane >
1189
1134
< PageLayout . Content
1190
1135
hidden = { {
0 commit comments