From 689e034524e93736cbbf7329a5dff83539cdbc7e Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Mon, 1 Apr 2019 09:56:29 +0300 Subject: [PATCH] Removed UI checkbox component --- .../src/components/ui-components/checkBox.js | 83 ------------------- 1 file changed, 83 deletions(-) delete mode 100644 monkey/monkey_island/cc/ui/src/components/ui-components/checkBox.js diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/checkBox.js b/monkey/monkey_island/cc/ui/src/components/ui-components/checkBox.js deleted file mode 100644 index 143df9c86..000000000 --- a/monkey/monkey_island/cc/ui/src/components/ui-components/checkBox.js +++ /dev/null @@ -1,83 +0,0 @@ -import '../../styles/CheckBox.scss' -import React from 'react'; -import Tooltip from 'react-tooltip-lite'; - -class Checkbox extends React.PureComponent { - - constructor() { - super(props); - - this.state = { - checked: false, - isAnimating: false, - }; - - this.toggleChecked = this.toggleChecked.bind(this); - this.ping = this.ping.bind(this); - this.composeStateClasses = this.composeStateClasses.bind(this); - } - - // - toggleChecked() { - if (this.state.isAnimating) return false; - this.setState({ - checked: !this.state.checked, - isAnimating: true, - }); - } - - // - ping() { - this.setState({ isAnimating: false }) - } - - // - composeStateClasses(core) { - let result = core; - - if (this.state.checked) { result += ' is-checked'; } - else { result += ' is-unchecked' } - - if (this.state.isAnimating) { result += ' do-ping'; } - return result; - } - - // - render() { - - const cl = this.composeStateClasses('ui-checkbox-btn'); - let tooltip = ""; - if (this.props.hasOwnProperty("tooltipContent") && this.props.hasOwnProperty("tooltipDirection")){ - tooltip = () - } - } - return ( -
- - - { - this.state.checked && - - - - - - } - { - !this.state.checked && - - - - - - } - -
-
- ) - } -} -export default Checkbox;