From b45785ee9fc9076c05adaa5d4c8383a9ea902cb1 Mon Sep 17 00:00:00 2001 From: EldarMuhamethanov <61377022+EldarMuhamethanov@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:32:05 +0300 Subject: [PATCH] a11y(WriteBar): add onClick to add interactivity (#7376) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Добавил прокидывание noop колбэка в onClick для кнопок --- packages/vkui/src/components/WriteBar/WriteBar.stories.tsx | 7 ++++--- .../src/components/WriteBarIcon/WriteBarIcon.stories.tsx | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/vkui/src/components/WriteBar/WriteBar.stories.tsx b/packages/vkui/src/components/WriteBar/WriteBar.stories.tsx index d06c884c38..add6e1f648 100644 --- a/packages/vkui/src/components/WriteBar/WriteBar.stories.tsx +++ b/packages/vkui/src/components/WriteBar/WriteBar.stories.tsx @@ -1,6 +1,7 @@ import { Meta, StoryObj } from '@storybook/react'; import { fn } from '@storybook/test'; import { Icon28SmileOutline } from '@vkontakte/icons'; +import { noop } from '@vkontakte/vkjs'; import { CanvasFullLayout, DisableCartesianParam } from '../../storybook/constants'; import { WriteBarIcon } from '../WriteBarIcon/WriteBarIcon'; import { WriteBar, WriteBarProps } from './WriteBar'; @@ -18,13 +19,13 @@ type Story = StoryObj; export const Playground: Story = { args: { - before: , + before: , placeholder: 'Сообщение', inlineAfter: ( - + ), - after: , + after: , }, }; diff --git a/packages/vkui/src/components/WriteBarIcon/WriteBarIcon.stories.tsx b/packages/vkui/src/components/WriteBarIcon/WriteBarIcon.stories.tsx index 14411f6716..c21168967c 100644 --- a/packages/vkui/src/components/WriteBarIcon/WriteBarIcon.stories.tsx +++ b/packages/vkui/src/components/WriteBarIcon/WriteBarIcon.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; +import { noop } from '@vkontakte/vkjs'; import { CanvasFullLayout, DisableCartesianParam } from '../../storybook/constants'; import { WriteBarIcon, WriteBarIconProps } from './WriteBarIcon'; @@ -15,5 +16,6 @@ type Story = StoryObj; export const Playground: Story = { args: { mode: 'attach', + onClick: noop, }, };