aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/search/CheckBox.tsx
diff options
context:
space:
mode:
authormadelinegr <monika_hedman@brown.edu>2019-06-13 18:41:18 -0400
committermadelinegr <monika_hedman@brown.edu>2019-06-13 18:41:18 -0400
commit639dee759e23083d269ab2a66f30e669b46a9aaf (patch)
treea2b89f24e3eafed96811592586fd0b124cd1e180 /src/client/views/search/CheckBox.tsx
parent16c54cf744476aac5ab0058a070206177f986982 (diff)
honestly no idea what is going on
Diffstat (limited to 'src/client/views/search/CheckBox.tsx')
-rw-r--r--src/client/views/search/CheckBox.tsx40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/client/views/search/CheckBox.tsx b/src/client/views/search/CheckBox.tsx
new file mode 100644
index 000000000..8b5f7d7c1
--- /dev/null
+++ b/src/client/views/search/CheckBox.tsx
@@ -0,0 +1,40 @@
+import * as React from 'react';
+import { observer } from 'mobx-react';
+import { observable, action, runInAction } from 'mobx';
+import "./CheckBox.scss";
+
+interface CheckBoxProps {
+ originalStatus: boolean;
+ updateStatus(newStatus: boolean): void;
+ title: string;
+}
+
+@observer
+export class CheckBox extends React.Component<CheckBoxProps>{
+ @observable _status: boolean;
+
+ constructor(props: CheckBoxProps) {
+ super(props);
+
+ this._status = this.props.originalStatus;
+ }
+
+ onClick = () => {
+ this._status = !this._status;
+ this.props.updateStatus(this._status);
+ }
+
+ render() {
+ return (
+ <div className="checkbox">
+ <div className="check-box">
+ <svg viewBox="10 10 20 20">
+ <path className="checkmark" d="M14.1 27.2l7.1 7.2 16.7-16.8" />
+ </svg>
+ </div>
+ <div className="checkbox-title">{this.props.title}</div>
+ </div>
+ )
+ }
+
+} \ No newline at end of file