PromucFlow_constructor/app/client/src/components/formControls/CheckboxControl.tsx
akash-codemonk a0351bfe81
Get query ui from form config (#205)
* Get query ui from form config

* Update editor config selector

* Show error message when config is undefined

* Move FormLabel to components

* Show dark theme in query editor

* Allow query name to be focused
2020-08-12 11:57:35 +05:30

36 lines
811 B
TypeScript

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() {
const { configProperty, label } = this.props;
return (
<StyledCheckbox
intent="primary"
name={configProperty}
align="left"
label={label}
/>
);
}
}
export type CheckboxControlProps = ControlProps;
export default CheckboxControl;