import * as React from "react"; import {ReactElement} from "react"; const cssStyle = require("./Checkbox.scss"); export interface CheckboxProperties { label?: ReactElement | string; disabled?: boolean; onChange?: (value: boolean) => void; value?: boolean; initialValue?: boolean; className?: string; children?: never; } export interface CheckboxState { checked?: boolean; disabled?: boolean; } export class Checkbox extends React.Component { constructor(props) { super(props); this.state = { }; } render() { const disabled = typeof this.state.disabled === "boolean" ? this.state.disabled : this.props.disabled; const checked = typeof this.props.value === "boolean" ? this.props.value : typeof this.state.checked === "boolean" ? this.state.checked : this.props.initialValue; const disabledClass = disabled ? cssStyle.disabled : ""; return (