Skip to content

Commit

Permalink
add web-component story types
Browse files Browse the repository at this point in the history
  • Loading branch information
43081j committed Aug 14, 2020
1 parent a71c6b3 commit a4eb172
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions app/web-components/src/client/preview/types.ts
@@ -1,5 +1,6 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { TemplateResult, SVGTemplateResult } from 'lit-element';
import { Args as DefaultArgs, Annotations, BaseMeta, BaseStory } from '@storybook/addons';

export { RenderContext } from '@storybook/core';

Expand All @@ -19,3 +20,18 @@ export interface ShowErrorArgs {
title: string;
description: string;
}

/**
* Metadata to configure the stories for a component.
*
* @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
*/
export type Meta<Args = DefaultArgs> = BaseMeta<string> & Annotations<Args, StoryFnHtmlReturnType>;

/**
* Story function that represents a component example.
*
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
*/
export type Story<Args = DefaultArgs> = BaseStory<Args, StoryFnHtmlReturnType> &
Annotations<Args, StoryFnHtmlReturnType>;
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -299,4 +299,4 @@
]
]
}
}
}

0 comments on commit a4eb172

Please sign in to comment.