unicornpaint

A web-based painting app for raspberry PI and pimoroni Unicorn Hat HD
Log | Files | Refs | README

ConnectedIndicator.js (373B)


      1 import React, { Component } from 'react'
      2 
      3 export default class ConnectedIndicator extends Component {
      4   render() {
      5     let connectedText = this.props.connected ? "Connected" : "Not connected"
      6     let color = this.props.connected ? "green" : "red"
      7     return <div><span style={{
      8       background:color,
      9       display: "inline-block"
     10     }}>{connectedText}</span></div>
     11   }
     12 }