give service comp prop types
This commit is contained in:
parent
54df6d02e9
commit
267ddc890f
2 changed files with 17 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
"i": "^0.3.6",
|
||||
"ms": "^2.1.1",
|
||||
"npm": "^6.1.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.4.0",
|
||||
"react-dom": "^16.4.0",
|
||||
"react-placeholder": "^3.0.1",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
|
||||
|
@ -29,4 +30,19 @@ const Service = ({ graph, name, status, latency, description }) => (
|
|||
</div>
|
||||
);
|
||||
|
||||
Service.defaultProps = {
|
||||
graph: null,
|
||||
latency: null,
|
||||
};
|
||||
|
||||
Service.propTypes = {
|
||||
graph: PropTypes.arrayOf(
|
||||
PropTypes.arrayOf(PropTypes.number),
|
||||
),
|
||||
name: PropTypes.string.isRequired,
|
||||
status: PropTypes.bool.isRequired,
|
||||
latency: PropTypes.number,
|
||||
description: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default Service;
|
||||
|
|
Loading…
Reference in a new issue