Add documentation about parameters in preview.js

This commit is contained in:
Koen Vlaswinkel
2022-09-07 16:36:24 +02:00
parent 2211e2317d
commit d15e3885d7

View File

@@ -6,14 +6,18 @@ import '@vscode/codicons/dist/codicon.css';
import '../src/stories/vscode-theme.css'; import '../src/stories/vscode-theme.css';
// https://storybook.js.org/docs/react/configure/overview#configure-story-rendering
export const parameters = { export const parameters = {
// All props starting with `on` will automatically receive an action as a prop
actions: { argTypesRegex: "^on[A-Z].*" }, actions: { argTypesRegex: "^on[A-Z].*" },
// All props matching these names will automatically get the correct control
controls: { controls: {
matchers: { matchers: {
color: /(background|color)$/i, color: /(background|color)$/i,
date: /Date$/, date: /Date$/,
}, },
}, },
// Use a dark theme to be aligned with VSCode
docs: { docs: {
theme: themes.dark, theme: themes.dark,
}, },