Merge Development (#64)
* Add connection status to vehicles page * ConnectedIcon control * Handle Style
This commit is contained in:
21
src/components/Controls/ConnectedIcon/index.jsx
Normal file
21
src/components/Controls/ConnectedIcon/index.jsx
Normal 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;
|
||||
Reference in New Issue
Block a user