@storybook/preact 8.0.0-alpha.6 → 8.0.0-alpha.8

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -21,19 +21,9 @@ type StoryFn<TArgs = Args> = AnnotatedStoryFn<PreactRenderer, TArgs>;
21
21
  * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
22
22
  */
23
23
  type StoryObj<TArgs = Args> = StoryAnnotations<PreactRenderer, TArgs>;
24
- /**
25
- * @deprecated Use `StoryFn` instead.
26
- * Use `StoryObj` if you want to migrate to CSF3, which uses objects instead of functions to represent stories.
27
- * You can read more about the CSF3 format here: https://storybook.js.org/blog/component-story-format-3-0/
28
- *
29
- * Story function that represents a CSFv2 component example.
30
- *
31
- * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
32
- */
33
- type Story<TArgs = Args> = StoryFn<TArgs>;
34
24
  type Decorator<TArgs = StrictArgs> = DecoratorFunction<PreactRenderer, TArgs>;
35
25
  type Loader<TArgs = StrictArgs> = LoaderFunction<PreactRenderer, TArgs>;
36
26
  type StoryContext<TArgs = StrictArgs> = StoryContext$1<PreactRenderer, TArgs>;
37
27
  type Preview = ProjectAnnotations<PreactRenderer>;
38
28
 
39
- export { Decorator, Loader, Meta, PreactRenderer, Preview, Story, StoryContext, StoryFn, StoryObj };
29
+ export { Decorator, Loader, Meta, PreactRenderer, Preview, StoryContext, StoryFn, StoryObj };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/preact",
3
- "version": "8.0.0-alpha.6",
3
+ "version": "8.0.0-alpha.8",
4
4
  "description": "Storybook Preact renderer",
5
5
  "keywords": [
6
6
  "storybook"
@@ -48,8 +48,8 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@storybook/global": "^5.0.0",
51
- "@storybook/preview-api": "8.0.0-alpha.6",
52
- "@storybook/types": "8.0.0-alpha.6",
51
+ "@storybook/preview-api": "8.0.0-alpha.8",
52
+ "@storybook/types": "8.0.0-alpha.8",
53
53
  "ts-dedent": "^2.0.0"
54
54
  },
55
55
  "devDependencies": {
@@ -1,3 +1,4 @@
1
+ import { fn } from '@storybook/test';
1
2
  import { Button } from './Button';
2
3
 
3
4
  // More on how to set up stories at: https://storybook.js.org/docs/writing-stories
@@ -9,6 +10,8 @@ export default {
9
10
  backgroundColor: { control: 'color' },
10
11
  onClick: { action: 'onClick' },
11
12
  },
13
+ // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
14
+ args: { onClick: fn() },
12
15
  };
13
16
 
14
17
  // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args