Skip to content

Instantly share code, notes, and snippets.

@oxodesign
Created August 29, 2018 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oxodesign/d4c2dbc41c9f85eaaa18a432b21da9ab to your computer and use it in GitHub Desktop.
Save oxodesign/d4c2dbc41c9f85eaaa18a432b21da9ab to your computer and use it in GitHub Desktop.
import React, {Component} from 'react';
class Online extends Component {
renderStatus() {
if(this.props.online === true){
return <span className="text-success">ONLINE</span>
}
return <span className="text-danger">OFFLINE</span>
}
render() {
return (
<p className="text-center">
Strem Status: { this.renderStatus() }
</p>
);
}
}
export default Online;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment