CEC-287 Add connection status to vehicles page (#63)

* Add connection status to vehicles page

* ConnectedIcon control

* Handle Style
This commit is contained in:
John Wu
2021-06-25 10:17:03 -07:00
committed by GitHub
parent 8bb245a417
commit ab37cd598f
3 changed files with 31 additions and 9 deletions

View File

@@ -0,0 +1,21 @@
import React from "react";
import PropTypes from "prop-types";
import CheckCircleIcon from "@material-ui/icons/CheckCircle";
const ConnectedIcon = (props) => {
if (props.connected) {
return (
<span style={props.style}>
<CheckCircleIcon style={{ color: "Green", fontSize: 12 }} />
</span>
);
}
return null;
};
ConnectedIcon.propTypes = {
connected: PropTypes.bool.isRequired,
};
export default ConnectedIcon;