Skip to content

Commit

Permalink
Padded layout for components in storybook by default (#6771)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-page committed Jul 27, 2022
1 parent 6365532 commit b5ff69e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-zoos-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': patch
---

Add spacing around components in storybook, adjust grid if there is spacing
4 changes: 4 additions & 0 deletions polaris-react/.storybook/GridOverlay/GridOverlay.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.sb-main-padded .GridOverlay {
margin: 0 1rem;
}

.GridOverlay {
--pc-top-bar-height: 56px;
--pc-nav-width: 240px;
Expand Down
11 changes: 8 additions & 3 deletions polaris-react/.storybook/polaris-readme-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ module.exports = function loader(source) {

const readme = parseCodeExamples(source);

const hasFullscreenLayout = ['App provider', 'Frame', 'Navigation'].includes(
readme.name,
);
const hasFullscreenLayout = [
'App provider',
'Contextual save bar',
'Frame',
'Fullscreen bar',
'Navigation',
'Sheet',
].includes(readme.name);

const omitAppProvider = [
'Frame',
Expand Down
5 changes: 0 additions & 5 deletions polaris-react/.storybook/preview-body.html

This file was deleted.

0 comments on commit b5ff69e

Please sign in to comment.