import classNames from 'classnames'; import { useKeyValue } from '../../hooks/useKeyValue'; import { BulkPairEditor } from './BulkPairEditor'; import { IconButton } from './IconButton'; import type { PairEditorProps } from './PairEditor'; import { PairEditor } from './PairEditor'; interface Props extends PairEditorProps { preferenceName: string; forcedEnvironmentId?: string; } export function PairOrBulkEditor({ preferenceName, ...props }: Props) { const { value: useBulk, set: setUseBulk } = useKeyValue({ namespace: 'global', key: ['bulk_edit', preferenceName], fallback: false, }); return (
{useBulk ? : }
setUseBulk((b) => !b)} icon={useBulk ? 'table' : 'file_code'} />
); }