import React from "react"; import { Checkbox } from "design-system-old"; import BaseControl, { ControlProps } from "./BaseControl"; import { ControlType } from "constants/PropertyControlConstants"; import { Field, WrappedFieldInputProps, WrappedFieldMetaProps, } from "redux-form"; import styled from "styled-components"; const StyledCheckbox = styled(Checkbox)``; class CheckboxControl extends BaseControl { getControlType(): ControlType { return "CHECKBOX"; } render() { return ( ); } } type renderComponentProps = CheckboxControlProps & { input?: WrappedFieldInputProps; meta?: WrappedFieldMetaProps; }; function renderComponent(props: renderComponentProps) { const onChangeHandler = (value: boolean) => { props.input && props.input.onChange && props.input.onChange(value); }; return ( ); } export interface CheckboxControlProps extends ControlProps { info?: string; } export default CheckboxControl;