problems: show status icon

This commit is contained in:
Alexander Zobnin
2018-12-28 19:24:57 +03:00
parent f31f9757ba
commit eb2ba5ae07
8 changed files with 124 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
import React from 'react';
import classNames from 'classnames';
interface GFHeartIconProps {
status: 'critical' | 'warning' | 'online' | 'ok' | 'problem';
className?: string;
}
export default function GFHeartIcon(props: GFHeartIconProps) {
const status = props.status;
const className = classNames("icon-gf", props.className,
{ "icon-gf-critical": status === 'critical' || status === 'problem' },
{ "icon-gf-warning": status === 'warning' },
{ "icon-gf-online": status === 'online' || status === 'ok' },
);
return (
<i className={className}></i>
);
}