Skip to content

Commit d15e388

Browse files
committed
Add documentation about parameters in preview.js
1 parent 2211e23 commit d15e388

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

extensions/ql-vscode/.storybook/preview.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ import '@vscode/codicons/dist/codicon.css';
66

77
import '../src/stories/vscode-theme.css';
88

9+
// https://storybook.js.org/docs/react/configure/overview#configure-story-rendering
910
export const parameters = {
11+
// All props starting with `on` will automatically receive an action as a prop
1012
actions: { argTypesRegex: "^on[A-Z].*" },
13+
// All props matching these names will automatically get the correct control
1114
controls: {
1215
matchers: {
1316
color: /(background|color)$/i,
1417
date: /Date$/,
1518
},
1619
},
20+
// Use a dark theme to be aligned with VSCode
1721
docs: {
1822
theme: themes.dark,
1923
},

0 commit comments

Comments
 (0)