From 63b9db4e9060889a7d3eb9485d2a65b41d54a818 Mon Sep 17 00:00:00 2001 From: Alexey Sudilovskiy Date: Tue, 21 May 2024 00:10:36 +0200 Subject: [PATCH] fix: add `aria-label` --- src/components/AvatarStack/AvatarStack.tsx | 8 +++++++- src/components/AvatarStack/i18n/en.json | 3 +++ src/components/AvatarStack/i18n/index.ts | 8 ++++++++ src/components/AvatarStack/i18n/ru.json | 3 +++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 src/components/AvatarStack/i18n/en.json create mode 100644 src/components/AvatarStack/i18n/index.ts create mode 100644 src/components/AvatarStack/i18n/ru.json diff --git a/src/components/AvatarStack/AvatarStack.tsx b/src/components/AvatarStack/AvatarStack.tsx index 1cc522cade..d52c82e2f2 100644 --- a/src/components/AvatarStack/AvatarStack.tsx +++ b/src/components/AvatarStack/AvatarStack.tsx @@ -5,6 +5,7 @@ import {isOfType} from '../utils/isOfType'; import {AvatarStackItem} from './AvatarStackItem'; import {AvatarStackMoreButton} from './AvatarStackMoreButton'; +import i18n from './i18n'; import type {AvatarStackProps} from './types'; import './AvatarStack.scss'; @@ -53,7 +54,12 @@ const AvatarStackComponent = ({ if (!moreButton.length && hasMoreButton) { const guessedSize = visibleItems[0]?.props.children.props.size; moreButton.push( - , + , ); } diff --git a/src/components/AvatarStack/i18n/en.json b/src/components/AvatarStack/i18n/en.json new file mode 100644 index 0000000000..5955d021a9 --- /dev/null +++ b/src/components/AvatarStack/i18n/en.json @@ -0,0 +1,3 @@ +{ + "more": "More" +} diff --git a/src/components/AvatarStack/i18n/index.ts b/src/components/AvatarStack/i18n/index.ts new file mode 100644 index 0000000000..600a77e666 --- /dev/null +++ b/src/components/AvatarStack/i18n/index.ts @@ -0,0 +1,8 @@ +import {addComponentKeysets} from '../../utils/addComponentKeysets'; + +import en from './en.json'; +import ru from './ru.json'; + +const COMPONENT = 'AvatarStack'; + +export default addComponentKeysets({en, ru}, COMPONENT); diff --git a/src/components/AvatarStack/i18n/ru.json b/src/components/AvatarStack/i18n/ru.json new file mode 100644 index 0000000000..a00355fc53 --- /dev/null +++ b/src/components/AvatarStack/i18n/ru.json @@ -0,0 +1,3 @@ +{ + "more": "Больше" +}