Skip to content

Commit

Permalink
Add explicit action spies
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Dec 10, 2024
1 parent e82b24f commit 7bfce92
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import type { Meta, StoryFn } from '@storybook/react';
import { fn } from '@storybook/test';

/**
* WordPress dependencies
Expand Down Expand Up @@ -44,6 +45,9 @@ const meta: Meta< typeof CustomSelectControlV2 > = {
</div>
),
],
args: {
onChange: fn(),
},
};
export default meta;

Expand Down
4 changes: 4 additions & 0 deletions packages/components/src/tab-panel/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import type { Meta, StoryFn } from '@storybook/react';
import { fn } from '@storybook/test';

/**
* WordPress dependencies
Expand All @@ -22,6 +23,9 @@ const meta: Meta< typeof TabPanel > = {
controls: { expanded: true },
docs: { canvas: { sourceState: 'shown' } },
},
args: {
onSelect: fn(),
},
};
export default meta;

Expand Down
5 changes: 5 additions & 0 deletions packages/components/src/tabs/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import type { Meta, StoryFn } from '@storybook/react';
import { fn } from '@storybook/test';

/**
* WordPress dependencies
Expand Down Expand Up @@ -39,6 +40,10 @@ const meta: Meta< typeof Tabs > = {
controls: { expanded: true },
docs: { canvas: { sourceState: 'shown' } },
},
args: {
onActiveTabIdChange: fn(),
onSelect: fn(),
},
};
export default meta;

Expand Down

0 comments on commit 7bfce92

Please sign in to comment.