@storybook/react 7.1.0-alpha.33 → 7.1.0-alpha.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react",
3
- "version": "7.1.0-alpha.33",
3
+ "version": "7.1.0-alpha.35",
4
4
  "description": "Storybook React renderer",
5
5
  "keywords": [
6
6
  "storybook"
@@ -52,13 +52,13 @@
52
52
  "prep": "../../../scripts/prepare/bundle.ts"
53
53
  },
54
54
  "dependencies": {
55
- "@storybook/client-logger": "7.1.0-alpha.33",
56
- "@storybook/core-client": "7.1.0-alpha.33",
57
- "@storybook/docs-tools": "7.1.0-alpha.33",
55
+ "@storybook/client-logger": "7.1.0-alpha.35",
56
+ "@storybook/core-client": "7.1.0-alpha.35",
57
+ "@storybook/docs-tools": "7.1.0-alpha.35",
58
58
  "@storybook/global": "^5.0.0",
59
- "@storybook/preview-api": "7.1.0-alpha.33",
60
- "@storybook/react-dom-shim": "7.1.0-alpha.33",
61
- "@storybook/types": "7.1.0-alpha.33",
59
+ "@storybook/preview-api": "7.1.0-alpha.35",
60
+ "@storybook/react-dom-shim": "7.1.0-alpha.35",
61
+ "@storybook/types": "7.1.0-alpha.35",
62
62
  "@types/escodegen": "^0.0.6",
63
63
  "@types/estree": "^0.0.51",
64
64
  "@types/node": "^16.0.0",
@@ -1,10 +1,16 @@
1
1
  import { Button } from './Button';
2
2
 
3
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
3
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
4
4
  export default {
5
5
  title: 'Example/Button',
6
6
  component: Button,
7
+ parameters: {
8
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
9
+ layout: 'centered',
10
+ },
11
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
7
12
  tags: ['autodocs'],
13
+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
8
14
  argTypes: {
9
15
  backgroundColor: { control: 'color' },
10
16
  },
@@ -6,6 +6,10 @@ import { Button } from './Button';
6
6
  const meta: Meta<typeof Button> = {
7
7
  title: 'Example/Button',
8
8
  component: Button,
9
+ parameters: {
10
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
11
+ layout: 'centered',
12
+ },
9
13
  // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
10
14
  tags: ['autodocs'],
11
15
  // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
@@ -17,9 +21,8 @@ const meta: Meta<typeof Button> = {
17
21
  export default meta;
18
22
  type Story = StoryObj<typeof Button>;
19
23
 
20
- // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
24
+ // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
21
25
  export const Primary: Story = {
22
- // More on args: https://storybook.js.org/docs/react/writing-stories/args
23
26
  args: {
24
27
  primary: true,
25
28
  label: 'Button',
@@ -1,4 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
+
2
3
  import { Header } from './Header';
3
4
 
4
5
  const meta: Meta<typeof Header> = {
@@ -2,11 +2,17 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
 
3
3
  import { Button } from './Button';
4
4
 
5
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
5
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
6
6
  const meta = {
7
7
  title: 'Example/Button',
8
8
  component: Button,
9
+ parameters: {
10
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
11
+ layout: 'centered',
12
+ },
13
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
9
14
  tags: ['autodocs'],
15
+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
10
16
  argTypes: {
11
17
  backgroundColor: { control: 'color' },
12
18
  },
@@ -1,4 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
+
2
3
  import { Header } from './Header';
3
4
 
4
5
  const meta = {