The library used to render Storybook stories with DNA.
This module is used internally by the @chialab/storybook-dna-vite
package. If you are setting up a Storybook for DNA components, you should refer to this documentation.
The module exposes a set of APIs to enhance Storybook documentation.
This method can be used to retrieve a registered Custom Elements Manifest.
import { getCustomElementsManifest } from '@chialab/storybook-dna';
const manifest = getCustomElementsManifest();
manifest.modules.forEach(() => {
//
});
Register a global Custom Elements Manifest.
import { setCustomElementsManifest } from '@chialab/storybook-dna';
setCustomElementsManifest({
schemaVersion: '1.0.0',
modules: [
...
],
});
Multiple generated manifests can be merged in a single global manifest.
import { getCustomElementsManifest, setCustomElementsManifest, mergeCustomElementsManifests } from '@chialab/storybook-dna';
const globalManifest = getCustomElementsManifest();
const manifest = {
schemaVersion: '1.0.0',
modules: [
...
],
};
setCustomElementsManifest(
mergeCustomElementsManifests(globalManifest, manifest)
);
DNA Storybook are released under the MIT license.