feat: arrow button to navigate to machines on dashboard

This commit is contained in:
Sérgio Salgado 2021-03-29 13:33:37 +01:00 committed by Josh Harvey
parent 50d763a800
commit 40646b605e
2 changed files with 20 additions and 2 deletions

View file

@ -13,6 +13,7 @@ import { Status } from 'src/components/Status'
import { Label2, TL2 } from 'src/components/typography'
// import { ReactComponent as TxInIcon } from 'src/styling/icons/direction/cash-in.svg'
import { ReactComponent as TxOutIcon } from 'src/styling/icons/direction/cash-out.svg'
import { ReactComponent as MachineLinkIcon } from 'src/styling/icons/month arrows/right.svg'
import styles from './MachinesTable.styles'
@ -99,10 +100,19 @@ const MachinesTable = ({ machines, numToRender }) => {
return (
<TableRow
onClick={() => redirect(machine)}
className={classnames(classes.row, classes.clickableRow)}
className={classnames(classes.row)}
key={machine.deviceId + idx}>
<StyledCell align="left">
<StyledCell
align="left"
className={classes.machineNameWrapper}>
<TL2>{machine.name}</TL2>
<MachineLinkIcon
className={classnames(
classes.machineRedirectIcon,
classes.clickableRow
)}
onClick={() => redirect(machine)}
/>
</StyledCell>
<StyledCell>
<Status status={machine.statuses[0]} />

View file

@ -87,6 +87,14 @@ const styles = {
marginBottom: 0,
padding: 0,
textAlign: 'center'
},
machineNameWrapper: {
display: 'flex',
flexDirection: 'row',
alignItems: 'center'
},
machineRedirectIcon: {
marginLeft: 10
}
}