MDK Logo
ReferenceUI KitReactUI Kit foundationComponentsSettings

ImportExportSettings

Settings panel for exporting site configuration as JSON and importing a previously saved snapshot.

Settings panel for exporting site configuration as JSON and importing a previously saved snapshot.

import { ImportExportSettings } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
onExportRequiredVoidFunction
onImportRequired(data: SettingsExportData) => void
onParseFileOptional((file: File) => Promise<SettingsExportData>) | undefined
isExportingOptionalboolean | undefined
isImportingOptionalboolean | undefined
classNameOptionalstring | undefined

Usage

Settings panel for exporting the site configuration as a JSON snapshot and importing a previously saved one. Handles file parsing internally.

Example

import { ImportExportSettings } from '@tetherto/mdk-react-devkit'export const ImportExportSettingsExample = () => (  <div className="mdk-example-row">    <ImportExportSettings      onExport={() => console.warn('export')}      onImport={(data) => console.warn('import', data)}    />  </div>)