1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

add status info tooltips

This commit is contained in:
Matthias Kretschmann 2019-06-19 13:43:21 +02:00
parent a4178854bb
commit 74b8bc3f13
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -1,15 +1,25 @@
import React from 'react'
import styles from './VersionStatus.module.scss'
const statusInfo: { [key: string]: string } = {
ok: 'Shows if connection to all component endpoints can be established.',
network: 'Shows if all components are on the same network.',
contracts: 'Shows if contracts loaded by components are the same version.'
}
const VersionStatus = ({
status
}: {
status: { ok: boolean; contracts: boolean; network: boolean }
status: { ok: boolean; network: boolean; contracts: boolean }
}) => {
return (
<div className={styles.status}>
{Object.entries(status).map(([key, value]) => (
<div className={styles.element} key={key}>
<div
className={styles.element}
key={key}
title={statusInfo[key]}
>
<span
className={
value === true