2020-08-12 06:27:35 +00:00
|
|
|
import React from "react";
|
|
|
|
|
import CheckboxField from "components/editorComponents/form/fields/CheckboxField";
|
|
|
|
|
import BaseControl, { ControlProps } from "./BaseControl";
|
|
|
|
|
import { ControlType } from "constants/PropertyControlConstants";
|
|
|
|
|
import styled from "styled-components";
|
|
|
|
|
|
|
|
|
|
const StyledCheckbox = styled(CheckboxField)`
|
|
|
|
|
&&& {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
class CheckboxControl extends BaseControl<CheckboxControlProps> {
|
|
|
|
|
getControlType(): ControlType {
|
|
|
|
|
return "CHECKBOX";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
2021-05-13 08:35:39 +00:00
|
|
|
const { configProperty, info, label } = this.props;
|
2020-08-12 06:27:35 +00:00
|
|
|
|
2021-04-28 10:28:39 +00:00
|
|
|
return <StyledCheckbox info={info} label={label} name={configProperty} />;
|
2020-08-12 06:27:35 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-11 12:54:00 +00:00
|
|
|
export interface CheckboxControlProps extends ControlProps {
|
|
|
|
|
info?: string;
|
|
|
|
|
}
|
2020-08-12 06:27:35 +00:00
|
|
|
|
|
|
|
|
export default CheckboxControl;
|