UNPKG

lincd-ui

Version:

22 lines (21 loc) 838 B
import React from 'react'; import { Shape } from 'lincd/shapes/Shape'; import { PropertyShape } from 'lincd/shapes/SHACL'; export interface SwitchEditorProps { onCheckedChange?: (e: any) => void; of?: Shape; property?: PropertyShape; /** * Converts the value returned by the shape, to the input string for the switch * @param shapePropertyValue * @returns */ preConvertValueFn?: (shapePropertyValue: any) => string; /** * Converts the value of the switch to a value that can be provided to the set method of the shape * @param inputValue * @returns */ postConvertValueFn?: (inputValue: string) => any; } export declare const SwitchEditor: ({ onCheckedChange, of, property, preConvertValueFn, postConvertValueFn, ...restProps }: SwitchEditorProps) => React.JSX.Element;