@voiceflow/storybook-config
v1.3.0
Published
## Install
Maintainers
Keywords
Readme
storybook-config
Install
Make sure the version of storybook installed matches the version specified in the peerDependencies of this package.
Storybook enforces that addons and the core package must be the same version.
yarn add --exact -D @voiceflow/storybook-config storybookUsage
Update the following files to enable the configuration
// .storybook/main.ts
export { default } from '@voiceflow/storybook-config';// .storybook/manager.ts
import '@voiceflow/storybook-config/setup';// .storybook/preview.tsx
import type { Preview } from '@storybook/react-vite';
import { TestIDs, useTestIDs } from '@voiceflow/storybook-config/plugins';
import React from 'react';
const preview: Preview = {
globalTypes: {
showTestIDs: TestIDs,
},
decorators: [
(Story, context) => {
useTestIDs(context.globals.showTestIDs);
return <Story />;
},
],
};
export default preview;