/
githubmirror
/
ydb-embedded-ui
Обзор
Документация
Войти
/
githubmirror
/
ydb-embedded-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/containers/Tenant/Query/QueryStoppedBanner/QueryStoppedBanner.tsx
39 строк
1 KB
Артём Муфазалов
feat: configure meta settings, use for table columns width (#3068)
14 ноя 2025, 16:32
Не верифицирован
14 ноя 2025, 16:32
56f1fc6
Код
Авторство
О чём код?
import React from 'react'; import {Alert} from '@gravity-ui/uikit'; import {SETTING_KEYS} from '../../../../store/reducers/settings/constants'; import {cn} from '../../../../utils/cn'; import {useSetting} from '../../../../utils/hooks'; import i18n from '../i18n'; const b = cn('ydb-query-stopped-banner'); import './QueryStoppedBanner.scss'; export function QueryStoppedBanner() { const [isQueryStoppedBannerClosed, setIsQueryStoppedBannerClosed] = useSetting<boolean>( SETTING_KEYS.QUERY_STOPPED_BANNER_CLOSED, ); const closeBanner = React.useCallback(() => { setIsQueryStoppedBannerClosed(true); }, [setIsQueryStoppedBannerClosed]); return isQueryStoppedBannerClosed ? null : ( <Alert className={b()} theme="normal" align="center" style={{paddingTop: 11, paddingBottom: 11}} message={<div className={b('message')}>{i18n('banner.query-stopped.message')}</div>} layout="horizontal" actions={ <Alert.Actions> <Alert.Action view="normal" onClick={closeBanner}> {i18n('banner.query-stopped.never-show')} </Alert.Action> </Alert.Actions> } /> ); }