mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 02:11:49 +08:00
22 lines
540 B
Plaintext
22 lines
540 B
Plaintext
```js
|
|
// Button.stories.js | Button.stories.jsx | Button.stories.ts | Button.stories.tsx
|
|
|
|
import Button from '.Button';
|
|
|
|
// To apply a grid to all stories of Button:
|
|
export default {
|
|
component: Button,
|
|
parameters: {
|
|
backgrounds: {
|
|
grid: {
|
|
cellSize: 20,
|
|
opacity: 0.5,
|
|
cellAmount: 5,
|
|
offsetX: 16, // default is 0 if story has 'fullscreen' layout, 16 if layout is 'padded'
|
|
offsetY: 16, // default is 0 if story has 'fullscreen' layout, 16 if layout is 'padded'
|
|
},
|
|
},
|
|
},
|
|
};
|
|
```
|