aboutsummaryrefslogtreecommitdiff
path: root/src/ConnectedIndicator.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ConnectedIndicator.js')
-rw-r--r--src/ConnectedIndicator.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ConnectedIndicator.js b/src/ConnectedIndicator.js
new file mode 100644
index 0000000..d4e1686
--- /dev/null
+++ b/src/ConnectedIndicator.js
@@ -0,0 +1,11 @@
+import React, { Component } from 'react'
+
+export default class ConnectedIndicator extends Component {
+ render() {
+ let connectedText = this.props.connected ? "Connected" : "Not connected"
+ let color = this.props.connected ? "green" : "red"
+ return <div><span style={{
+ background:color
+ }}>{connectedText}</span></div>
+ }
+} \ No newline at end of file