/
githubmirror
/
ydb-embedded-ui
Обзор
Документация
Войти
/
githubmirror
/
ydb-embedded-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/containers/Operations/OperationsControls.tsx
44 строки
1 KB
Hellen
feat: add new background operation type (#4061)
07 июл 2026, 16:31
Не верифицирован
07 июл 2026, 16:31
762fc43
Код
Авторство
О чём код?
import React from 'react'; import {Select} from '@gravity-ui/uikit'; import {Search} from '../../components/Search'; import type {OperationKind} from '../../types/api/operations'; import i18n from './i18n'; import {b} from './shared'; import './Operations.scss'; interface OperationsControlsProps { kind: OperationKind; operationKinds: {value: OperationKind; content: string}[]; searchValue: string; handleKindChange: (kind: OperationKind) => void; handleSearchChange: (value: string) => void; } export function OperationsControls({ kind, operationKinds, searchValue, handleKindChange, handleSearchChange, }: OperationsControlsProps) { return ( <React.Fragment> <Search value={searchValue} onChange={handleSearchChange} placeholder={i18n('pleaceholder_search')} className={b('search')} /> <Select value={[kind]} width={150} options={operationKinds} onUpdate={(value) => handleKindChange(value[0] as OperationKind)} /> </React.Fragment> ); }