import React from 'react'; import {Flex, SegmentedRadioGroup, Text} from '@gravity-ui/uikit'; import {b} from '../constants'; import '../StorageExpertModePanel.scss'; export interface ExpertModeOption { value: T; content: React.ReactNode; } interface ExpertModePanelLayoutProps { children: React.ReactNode; className?: string; } export function ExpertModePanelLayout({children, className}: ExpertModePanelLayoutProps) { return
{children}
; } interface ExpertModeRowProps { label: React.ReactNode; value: T; onUpdate: (value: T) => void; options: readonly ExpertModeOption[]; legend: React.ReactNode; qa?: string; } export function ExpertModeRow({ label, value, onUpdate, options, legend, qa, }: ExpertModeRowProps) { const labelId = React.useId(); return ( {label} onUpdate(nextValue as T)} size="s" > {options.map((option) => ( {option.content} ))} {legend} ); }