Skip to content

Commit 733c5b3

Browse files
authored
chore(Button): add storybook actions logging (#1592)
1 parent 0aec983 commit 733c5b3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/components/Button/__stories__/Button.stories.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
Globe,
99
Heart,
1010
} from '@gravity-ui/icons';
11+
import {action} from '@storybook/addon-actions';
1112
import type {Meta, StoryObj} from '@storybook/react';
1213

1314
import {Showcase} from '../../../demo/Showcase';
@@ -41,7 +42,16 @@ export default {
4142

4243
type Story = StoryObj<typeof Button>;
4344

44-
export const Default: Story = {args: {children: 'Button'}};
45+
export const Default: Story = {
46+
args: {
47+
children: 'Button',
48+
onClick: action('onClick'),
49+
onMouseEnter: action('onMouseEnter'),
50+
onMouseLeave: action('onMouseLeave'),
51+
onFocus: action('onFocus'),
52+
onBlur: action('onBlur'),
53+
},
54+
};
4555

4656
export const View: Story = {
4757
render: (args) => <ButtonViewShowcase {...args} />,

0 commit comments

Comments
 (0)