Skip to content

Commit 5a4b1e9

Browse files
committed
feat: remove iframe body margin by default
1 parent 356afc0 commit 5a4b1e9

File tree

4 files changed

+36
-18
lines changed

4 files changed

+36
-18
lines changed

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -104,23 +104,24 @@ module.exports = {
104104
};
105105
```
106106

107-
<a name="api"><a/>
107+
<a name="api"></a>
108108

109109
## API
110110

111-
| Parameter | Explanation | Input Type | Default |
112-
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | ----------------------------------------------------------------------------------- |
113-
| output | Specifies the filename for the generated asketch.json file. | string | `"dist/stories.asketch.json"` |
114-
| input | The location of Storybook's generated iframe.html. Use this over `url` if possible for performance. | string | `"dist/iframe.html"` |
115-
| url | Storybook iframe URL. Will end in `iframe.html`. Prefer `input` for performance if possible. | string | `"http://localhost:9001/iframe.html"` |
116-
| stories | Stories to extract from Storybook. You should probably override the default. | object/string | `"all"` |
117-
| concurrency | Number of headless Chrome tabs to run in parallel. Drastically impacts performance. | integer | `4` |
118-
| symbolGutter | Gutter to place between symbols in Sketch. | integer | `100` |
119-
| viewports | Viewport configuration. Will be arranged left-to-right by width. Try to avoid changing the key, as this is used to identify the symbol. | object | Mobile viewport (320px wide) and desktop viewport (1920px wide). See example below. |
120-
| querySelector | Query selector to select your node on each page. Uses `document.querySelectorAll`. | string | `"#root"` |
121-
| verbose | Verbose logging output. | boolean | `false` |
122-
| fixPseudo | Attempt to insert real elements in place of pseudo-elements | boolean | `false` |
123-
| puppeteerOptions | Options to be passed directly to `puppeteer.launch`. See [puppeteer docs](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions) for usage. | object | `{}` |
111+
| Parameter | Explanation | Input Type | Default |
112+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | ----------------------------------------------------------------------------------- |
113+
| output | Specifies the filename for the generated asketch.json file. | string | `"dist/stories.asketch.json"` |
114+
| input | The location of Storybook's generated iframe.html. Use this over `url` if possible for performance. | string | `"dist/iframe.html"` |
115+
| url | Storybook iframe URL. Will end in `iframe.html`. Prefer `input` for performance if possible. | string | `"http://localhost:9001/iframe.html"` |
116+
| stories | Stories to extract from Storybook. You should probably override the default. | object/string | `"all"` |
117+
| concurrency | Number of headless Chrome tabs to run in parallel. Drastically impacts performance. | integer | `4` |
118+
| symbolGutter | Gutter to place between symbols in Sketch. | integer | `100` |
119+
| viewports | Viewport configuration. Will be arranged left-to-right by width. Try to avoid changing the key, as this is used to identify the symbol. | object | Mobile viewport (320px wide) and desktop viewport (1920px wide). See example below. |
120+
| querySelector | Query selector to select your node on each page. Uses `document.querySelectorAll`. | string | `"#root"` |
121+
| verbose | Verbose logging output. | boolean | `false` |
122+
| fixPseudo | Attempt to insert real elements in place of pseudo-elements | boolean | `false` |
123+
| puppeteerOptions | Options to be passed directly to `puppeteer.launch`. See [puppeteer docs](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions) for usage. | object | `{}` |
124+
| removePreviewMargin | Remove preview margin from the iframe body. | boolean | `true` |
124125

125126
### Example story2sketch.config.js
126127

0 commit comments

Comments
 (0)