CEC-227, CEC-244 Add dashboard page, update car command control (#46)
* Create multiselect car table control Remove table overflow containers * Include trim to add car form * CEC-252 Replace modal status with link to car details page * Remove send command from car status page Fix menu key warning * Change car command control data Add Grafana menu items * Revert
This commit is contained in:
46
src/components/ListItemExternalLink.jsx
Normal file
46
src/components/ListItemExternalLink.jsx
Normal file
@@ -0,0 +1,46 @@
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import ListItem from "@material-ui/core/ListItem";
|
||||
import ListItemIcon from "@material-ui/core/ListItemIcon";
|
||||
import ListItemText from "@material-ui/core/ListItemText";
|
||||
import { Link } from "@material-ui/core";
|
||||
|
||||
function ListItemExternalLink(props) {
|
||||
const { icon, primary, url } = props;
|
||||
const style = {
|
||||
textDecoration: "inherit",
|
||||
color: "inherit",
|
||||
"&:link": {
|
||||
textDecoration: "inherit",
|
||||
color: "inherit",
|
||||
cursor: "auto",
|
||||
},
|
||||
"&:visited": {
|
||||
textDecoration: "inherit",
|
||||
color: "inherit",
|
||||
cursor: "auto",
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
<ListItem
|
||||
button
|
||||
component={Link}
|
||||
style={style}
|
||||
href={url}
|
||||
rel="noopener"
|
||||
target="_blank"
|
||||
>
|
||||
{icon ? <ListItemIcon>{icon}</ListItemIcon> : null}
|
||||
<ListItemText primary={primary} />
|
||||
</ListItem>
|
||||
);
|
||||
}
|
||||
|
||||
ListItemExternalLink.propTypes = {
|
||||
icon: PropTypes.element,
|
||||
primary: PropTypes.string.isRequired,
|
||||
url: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default ListItemExternalLink;
|
||||
Reference in New Issue
Block a user