Skip to content

Commit

Permalink
docs(storybook): add actions for setter props (#5169)
Browse files Browse the repository at this point in the history
  • Loading branch information
petermakowski authored Sep 21, 2023
1 parent e6d45c9 commit 2f3dfca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import "../src/scss/index.scss";

const preview: Preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
// Add Storybook actions for matching props by default (e.g. onClick, setContent).
// Can be overriden in stories.
// https://storybook.js.org/docs/react/essentials/actions#automatically-matching-args
actions: { argTypesRegex: "^on[A-Z].*|^set[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
Expand Down

0 comments on commit 2f3dfca

Please sign in to comment.