forked from storybookjs/storybook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentry-preview-docs.ts
39 lines (35 loc) · 1.08 KB
/
entry-preview-docs.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { SourceType, enhanceArgTypes } from 'storybook/internal/docs-tools';
import type { ArgTypesEnhancer, DecoratorFunction, InputType } from 'storybook/internal/types';
import { extractArgTypes, extractComponentDescription } from './docs/custom-elements';
import { sourceDecorator } from './docs/sourceDecorator';
import type { WebComponentsRenderer } from './types';
export const decorators: DecoratorFunction<WebComponentsRenderer>[] = [sourceDecorator];
export const parameters: {
docs: {
extractArgTypes: (tagName: string) =>
| {
[x: string]: InputType;
}
| null
| undefined;
extractComponentDescription: (tagName: string) => string | null | undefined;
story: {
inline: true;
};
source: {
type: SourceType;
language: string;
};
};
} = {
docs: {
extractArgTypes,
extractComponentDescription,
story: { inline: true },
source: {
type: SourceType.DYNAMIC,
language: 'html',
},
},
};
export const argTypesEnhancers: ArgTypesEnhancer<WebComponentsRenderer>[] = [enhanceArgTypes];