I have an Angular storybook file for the FooComponent.
In the storybook UI, I can’t seem to find the code snippet for <foo />
. How can I resolve this?
Is there a configuration to display the used code? I can’t find that in the storybook docs or any storybook examples in github.
const meta: Meta<FooComponent> = {
component: FooComponent,
title: 'FooComponent',
};
export default meta;
type Story = StoryObj<FooComponent>;
export const Primary: Story = {
args: { ... },
};
In main.ts
:
import type { StorybookConfig } from '@storybook/angular';
const config: StorybookConfig = {
stories: ['../../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', 'storybook-addon-angular-router'],
framework: {
name: '@storybook/angular',
options: { },
},
};
export default config;
// To customize your webpack configuration you can use the webpackFinal field.
// Check https://storybook.js.org/docs/react/builders/webpack#extending-storybooks-webpack-config
// and https://nx.dev/recipes/storybook/custom-builder-configs