new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Storybook · all subjects

configuration

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

@storybook/addon-mcp configuration options

The @storybook/addon-mcp addon accepts a toolsets configuration object with three boolean properties: dev (default true), docs (default true), and test (default true). These options toggle which toolsets are enabled in the MCP server. All toolsets are enabled by default. You provide these options when registering the addon in your main.js|ts file.

Story file naming convention

All story files should have the suffix *.stories.@(j|t)sx?, such as Badge.stories.js or Badge.stories.tsx. The docs preset assumes this naming convention for its source-loader setup. Using a different naming convention requires manual webpack configuration.

Configure addon-docs in main.js

Add '@storybook/addon-docs' to the addons array in .storybook/main.js to enable the Docs addon.

Set global iframe height in preview.js

To change the default iframe height globally, add to .storybook/preview.js: export const parameters = { docs: { story: { iframeHeight: '400px' } } }

Set global iframe height in preview.js parameters

To update the global default iframe height for Ember stories, modify .storybook/preview.js with: export const parameters = { docs: { story: { iframeHeight: '400px' } } };

Add @storybook/addon-docs to main.js addons configuration

In .storybook/main.js, add '@storybook/addon-docs' to the addons array to enable Docs for Ember projects.

Load generated JSON documentation in preview.js

In .storybook/preview.js, import setJSONDoc from '@storybook/addon-docs/ember' and import the docJson from ../dist/storybook-docgen/index.json, then call setJSONDoc(docJson) to load the generated documentation.

Configure main.js stories pattern to load MDX files

In .storybook/main.js, set the stories pattern to include MDX files, for example: stories: ['../src/stories/**/*.stories.@(js|mdx)']

ESLint rule use-storybook-testing-library applies to story files only

The ESLint rule use-storybook-testing-library should not be applied to test files. It should only be applied to story files. The Storybook ESLint rules should be configured to override or disable rules as needed for different file types.

Give your agent this brain