* 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
36 lines
811 B
TypeScript
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;
|