FeatureFlagsSettings
Settings panel listing every feature flag with per-flag enable/disable toggle and description.
Settings panel listing every feature flag with per-flag enable/disable toggle and description.
import { FeatureFlagsSettings } from "@tetherto/mdk-react-devkit";| Prop | Status | Type | Default | Description |
|---|---|---|---|---|
featureFlags | Required | Record<string, boolean> | — | — |
isEditingEnabled | Required | boolean | — | — |
isLoading | Optional | boolean | undefined | — | — |
isSaving | Optional | boolean | undefined | — | — |
onSave | Required | (flags: Record<string, boolean>) => void | — | — |
className | Optional | string | undefined | — | — |
Usage
Settings panel listing all feature flags with per-flag enable/disable toggles. Shows a save button when changes are pending.
Example
import { FeatureFlagsSettings } from '@tetherto/mdk-react-devkit'export const FeatureFlagsSettingsExample = () => ( <div className="mdk-example-row"> <FeatureFlagsSettings featureFlags={{ 'new-dashboard': true, 'beta-charts': false, 'pool-manager': true }} isEditingEnabled={true} onSave={(flags) => console.warn('saved flags', flags)} /> </div>)