Add documentation about parameters in preview.js
This commit is contained in:
@@ -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,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user