Update strings to make direct refs to buttons

This commit is contained in:
Fedor Indutny 2024-08-23 14:53:13 -07:00 committed by GitHub
parent 0f071afaf2
commit c535ed6c9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 16 deletions

View file

@ -319,19 +319,14 @@ export function CallsTab({
<p className="CallsTab__EmptyStateLabel">
<I18n
i18n={i18n}
id="icu:CallsTab__EmptyStateText--with-icon"
id="icu:CallsTab__EmptyStateText--with-icon-2"
components={{
// eslint-disable-next-line react/no-unstable-nested-components
newCallIcon: children => {
let label: string | undefined;
const first = children[0];
if (typeof first === 'string') {
label = first;
}
newCallButtonIcon: () => {
return (
<span
className="CallsTab__EmptyState__ActionIcon"
aria-label={label}
aria-label={i18n('icu:CallsTab__NewCallActionLabel')}
/>
);
},

View file

@ -225,19 +225,14 @@ export function StoriesTab({
) : (
<I18n
i18n={i18n}
id="icu:Stories__placeholder-with-icon--text"
id="icu:Stories__placeholder-with-icon--text-2"
components={{
// eslint-disable-next-line react/no-unstable-nested-components
newStoryIcon: children => {
let label: string | undefined;
const first = children[0];
if (typeof first === 'string') {
label = first;
}
newStoryButtonIcon: () => {
return (
<span
className="Stories__placeholder__text__action"
aria-label={label}
aria-label={i18n('icu:Stories__add')}
/>
);
},