Skip to content

Commit

Permalink
fix(documentation): definition of stencil web-components in storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschuerch committed Apr 19, 2024
1 parent 71fc92a commit f6bf0ed
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// @ts-ignore
import { defineCustomElements as defineInternetHeader } from '@swisspost/internet-header/loader/index.es2017.js';
import { defineCustomElements as definePostComponents } from '@swisspost/design-system-components/loader';
import {
applyPolyfills as headerPolyfills,
defineCustomElements as defineHeader,
} from '@swisspost/internet-header/loader/index.es2017.js';
import {
applyPolyfills as componentsPolyfills,
defineCustomElements as defineComponents,
} from '@swisspost/design-system-components/loader';
import { setStencilDocJson } from '@pxtrn/storybook-addon-docs-stencil';
import {
StencilJsonDocs,
Expand All @@ -10,8 +16,12 @@ import postComponentsDocJson from '@swisspost/design-system-components/dist/docs
import internetHeaderDocJson from '@swisspost/internet-header/dist/docs.json';
import '../../src/shared/link-design/link-design.component';

defineInternetHeader(window);
definePostComponents(window);
headerPolyfills().then(() => {
defineHeader();
});
componentsPolyfills().then(() => {
defineComponents();
});

if (postComponentsDocJson && internetHeaderDocJson) {
const jsonDocs: StencilJsonDocs = {
Expand Down

0 comments on commit f6bf0ed

Please sign in to comment.