Skip to content

Commit

Permalink
chore(Button): add storybook actions logging (#1592)
Browse files Browse the repository at this point in the history
  • Loading branch information
itwillwork authored May 20, 2024
1 parent 0aec983 commit 733c5b3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/Button/__stories__/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Globe,
Heart,
} from '@gravity-ui/icons';
import {action} from '@storybook/addon-actions';
import type {Meta, StoryObj} from '@storybook/react';

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

type Story = StoryObj<typeof Button>;

export const Default: Story = {args: {children: 'Button'}};
export const Default: Story = {
args: {
children: 'Button',
onClick: action('onClick'),
onMouseEnter: action('onMouseEnter'),
onMouseLeave: action('onMouseLeave'),
onFocus: action('onFocus'),
onBlur: action('onBlur'),
},
};

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

0 comments on commit 733c5b3

Please sign in to comment.