From 733c5b3bd425ee57d660ed176d15bc99084f6d9a Mon Sep 17 00:00:00 2001 From: itwillwork <15855766+itwillwork@users.noreply.github.com> Date: Mon, 20 May 2024 14:39:38 +0300 Subject: [PATCH] chore(Button): add storybook actions logging (#1592) --- src/components/Button/__stories__/Button.stories.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/Button/__stories__/Button.stories.tsx b/src/components/Button/__stories__/Button.stories.tsx index 68a5363f5a..ecd4c57206 100644 --- a/src/components/Button/__stories__/Button.stories.tsx +++ b/src/components/Button/__stories__/Button.stories.tsx @@ -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'; @@ -41,7 +42,16 @@ export default { type Story = StoryObj; -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) => ,