New styles for various empty states

This commit is contained in:
Fedor Indutny 2024-08-13 16:34:42 -07:00 committed by GitHub
parent 74b90a5cdd
commit d70aa55a78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 295 additions and 95 deletions

View file

@ -24,6 +24,7 @@ import type { WidthBreakpoint } from './_util';
import type { CallLinkType } from '../types/CallLink';
import type { CallStateType } from '../state/selectors/calling';
import type { StartCallData } from './ConfirmLeaveCallModal';
import { I18n } from './I18n';
enum CallsTabSidebarView {
CallsListView,
@ -316,7 +317,26 @@ export function CallsTab({
<div className="CallsTab__EmptyState">
<div className="CallsTab__EmptyStateIcon" />
<p className="CallsTab__EmptyStateLabel">
{i18n('icu:CallsTab__EmptyStateText')}
<I18n
i18n={i18n}
id="icu:CallsTab__EmptyStateText--with-icon"
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;
}
return (
<span
className="CallsTab__EmptyState__ActionIcon"
aria-label={label}
/>
);
},
}}
/>
</p>
</div>
) : (