2022-10-12 12:22:22 +02:00

37 lines
711 B
TypeScript

import globalThis from 'global';
import { actions, configureActions } from '@storybook/addon-actions';
const configs = actions('actionA', 'actionB', 'actionC');
export default {
component: globalThis.Components.Button,
args: {
label: 'Click Me!',
},
parameters: {
chromatic: { disable: true },
},
};
export const ActionA = {
args: { onClick: configs.actionA },
};
export const ActionB = {
args: { onClick: configs.actionB },
};
export const ActionC = {
args: { onClick: configs.actionC },
};
export const ConfigureActions = {
args: { onClick: configs.actionA },
decorators: [
(storyFn: any) => {
configureActions({ depth: 2 });
return storyFn();
},
],
};