@handie/squirtle
Version:
Widgets for Handie-React
10 lines (9 loc) • 485 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { getControl } from 'handie-react';
import { BooleanFieldStructuralWidget } from 'handie-react/dist/widgets/class';
export default class SwitchEditBooleanFieldWidget extends BooleanFieldStructuralWidget {
render() {
const Switch = getControl('Switch');
return Switch ? (_jsx(Switch, { value: this.props.value, disabled: this.state.disabled, onChange: value => this.onChange(value) }, void 0)) : null;
}
}