move from emoji to icons
This commit is contained in:
parent
0419434e89
commit
54df6d02e9
5 changed files with 5190 additions and 1 deletions
5164
priv/frontend/package-lock.json
generated
5164
priv/frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -3,8 +3,13 @@
|
|||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.0-14",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.1.0-11",
|
||||
"@fortawesome/react-fontawesome": "0.1.0-11",
|
||||
"@nivo/line": "^0.42.1",
|
||||
"i": "^0.3.6",
|
||||
"ms": "^2.1.1",
|
||||
"npm": "^6.1.0",
|
||||
"react": "^16.4.0",
|
||||
"react-dom": "^16.4.0",
|
||||
"react-placeholder": "^3.0.1",
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import React from 'react';
|
||||
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
|
||||
import Graph from './Graph.js';
|
||||
import './Service.css';
|
||||
|
||||
|
@ -7,7 +9,10 @@ const Service = ({ graph, name, status, latency, description }) => (
|
|||
<div className="service">
|
||||
<header>
|
||||
<div className="emoji">
|
||||
{status ? '✅' : '🚫'}
|
||||
<FontAwesomeIcon
|
||||
icon={`${status ? 'check' : 'exclamation'}-circle`}
|
||||
style={{ color: status ? '#2ECC40' : '#FF4136' }}
|
||||
/>
|
||||
</div>
|
||||
<h2 className="title">
|
||||
{name} {latency ? (
|
||||
|
|
12
priv/frontend/src/icons.js
Normal file
12
priv/frontend/src/icons.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { library } from '@fortawesome/fontawesome-svg-core';
|
||||
import {
|
||||
faCheckCircle,
|
||||
faExclamationCircle,
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
export default function register() {
|
||||
library.add(
|
||||
faCheckCircle,
|
||||
faExclamationCircle,
|
||||
);
|
||||
}
|
|
@ -1,9 +1,12 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
import register from './icons.js';
|
||||
import './index.css';
|
||||
import App from './App';
|
||||
|
||||
register();
|
||||
|
||||
ReactDOM.render(
|
||||
<App />,
|
||||
document.getElementById('root'),
|
||||
|
|
Loading…
Reference in a new issue