Skip to content

Commit b5ff69e

Browse files
authored
Padded layout for components in storybook by default (#6771)
1 parent 6365532 commit b5ff69e

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

.changeset/grumpy-zoos-retire.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': patch
3+
---
4+
5+
Add spacing around components in storybook, adjust grid if there is spacing

polaris-react/.storybook/GridOverlay/GridOverlay.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.sb-main-padded .GridOverlay {
2+
margin: 0 1rem;
3+
}
4+
15
.GridOverlay {
26
--pc-top-bar-height: 56px;
37
--pc-nav-width: 240px;

polaris-react/.storybook/polaris-readme-loader.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@ module.exports = function loader(source) {
2525

2626
const readme = parseCodeExamples(source);
2727

28-
const hasFullscreenLayout = ['App provider', 'Frame', 'Navigation'].includes(
29-
readme.name,
30-
);
28+
const hasFullscreenLayout = [
29+
'App provider',
30+
'Contextual save bar',
31+
'Frame',
32+
'Fullscreen bar',
33+
'Navigation',
34+
'Sheet',
35+
].includes(readme.name);
3136

3237
const omitAppProvider = [
3338
'Frame',

polaris-react/.storybook/preview-body.html

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)