Skip to content

Commit

Permalink
Add ^set[A-Z].* pattern match to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Apr 14, 2021
1 parent eeaad96 commit bd49edd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
31 changes: 22 additions & 9 deletions src/components/AppView/AppView.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
import AppView from './AppView';
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs/blocks';
import AppView from './AppView';

The primary view for webqueue2.
<Meta
title="Components/AppView"
component={AppView}
argTypes={{
setDarkMode: {
table: {
disable: true
}
}
}}
/>

<Meta title="Components/AppView" component={AppView} />
The primary view for webqueue2. This is just a container.

# AppView without queue selected
export const Template = (args) => <AppView {...args} />

<Canvas>
<Story name="Default">
{args => <AppView {...args} />}
<Story name="Defailt"
args={{
setDarkMode: () => alert("Function not set for docs."),
}}
>
{args => <AppView {...args} />}
</Story>
</Canvas>



<ArgsTable of={AppView} />
2 changes: 1 addition & 1 deletion storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const decorators = [
*/
export const parameters = {
// Match arg names starting with on and followed by at least one capital letter for actions.
actions: { argTypesRegex: "^on[A-Z].*" },
actions: { argTypesRegex: "^on|set[A-Z].*" },
options: {
storySort: {
method: 'alphabetical',
Expand Down

0 comments on commit bd49edd

Please sign in to comment.