import React from "react"; import BaseControl, { ControlData, ControlProps } from "./BaseControl"; import Switch from "components/ads/Switch"; class SwitchControl extends BaseControl { render() { return ( ); } onToggle = () => { this.updateProperty(this.props.propertyName, !this.props.propertyValue); }; static getControlType() { return "SWITCH"; } static canDisplayValueInUI(config: ControlData, value: any): boolean { return value === "true" || value === "false"; } } export type SwitchControlProps = ControlProps; export default SwitchControl;