Chore: move shared components to components/
This commit is contained in:
22
src/components/GFHeartIcon/GFHeartIcon.tsx
Normal file
22
src/components/GFHeartIcon/GFHeartIcon.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import React, { FC } from 'react';
|
||||
import { cx } from 'emotion';
|
||||
|
||||
interface Props {
|
||||
status: 'critical' | 'warning' | 'online' | 'ok' | 'problem';
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export const GFHeartIcon: FC<Props> = ({ status, className }) => {
|
||||
const iconClass = cx(
|
||||
className,
|
||||
'icon-gf',
|
||||
{ "icon-gf-critical": status === 'critical' || status === 'problem' || status === 'warning'},
|
||||
{ "icon-gf-online": status === 'online' || status === 'ok' },
|
||||
);
|
||||
|
||||
return (
|
||||
<i className={iconClass}></i>
|
||||
);
|
||||
};
|
||||
|
||||
export default GFHeartIcon;
|
||||
Reference in New Issue
Block a user