/
githubmirror
/
ydb-embedded-ui
Обзор
Документация
Войти
/
githubmirror
/
ydb-embedded-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/utils/illustrations.ts
22 строки
600 B
Anton Standrik
feat: improve errors diagnostics (#3537)
11 мар 2026, 10:48
Не верифицирован
11 мар 2026, 10:48
3ce7547
Код
Авторство
О чём код?
import { AccessDenied, Identity, InternalError, NoSearchResults, SuccessOperation, } from '@gravity-ui/illustrations'; import type {IllustrationComponent, IllustrationName} from '../uiFactory/types'; import {uiFactory} from '../uiFactory/uiFactory'; const defaults: Record<IllustrationName, IllustrationComponent> = { InternalError, AccessDenied, Unauthenticated: Identity, NoSearchResults, SuccessOperation, }; export function getIllustration(name: IllustrationName): IllustrationComponent { return uiFactory.illustrations?.[name] ?? defaults[name]; }