Skip to content

Commit 9080ab6

Browse files
authored
chore: refactor drawer permutation page (#3476)
1 parent 1efbf47 commit 9080ab6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

pages/drawer/permutations.page.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import ScreenshotArea from '../utils/screenshot-area';
1111

1212
const permutations = createPermutations<DrawerProps>([
1313
{
14-
loading: [false, true],
1514
disableContentPaddings: [true, false],
1615
header: [null, <h2 key="header">Header</h2>],
1716
children: [null, <>Dummy content</>],
1817
},
18+
{ loading: [true], i18nStrings: [{ loadingText: 'Loading' }, {}] },
1919
]);
2020

2121
export default function () {
@@ -26,10 +26,13 @@ export default function () {
2626
<PermutationsView
2727
permutations={permutations}
2828
render={permutation => (
29-
// add visible border to capture component paddings
30-
<div style={{ border: '1px solid red' }}>
31-
<Drawer {...permutation} />
32-
</div>
29+
<>
30+
{!permutation.header && !permutation.children && !permutation.loading && <p>(empty permutation)</p>}
31+
{/* add visible border to capture component paddings */}
32+
<div style={{ border: '1px solid red' }}>
33+
<Drawer {...permutation} />
34+
</div>
35+
</>
3336
)}
3437
/>
3538
</ScreenshotArea>

0 commit comments

Comments
 (0)