elstat/priv/frontend/src/Service.js

28 lines
619 B
JavaScript

import React from 'react';
import Graph from './Graph.js';
import './Service.css';
const Service = ({ graph, name, status, latency, description }) => (
<div className="service">
<header>
<div className="emoji">
{status ? '✅' : '🚫'}
</div>
<h2 className="title">
{name} {latency ? (
<span className="latency">
{latency}ms
</span>
) : null}
</h2>
</header>
<p className="description">
{description}
</p>
{graph ? <Graph width={500} height={175} data={graph} /> : null}
</div>
);
export default Service;