Skip to content

Commit

Permalink
Add tool tips to the track button and the connection issues indicator.
Browse files Browse the repository at this point in the history
  • Loading branch information
stasatdaglabs committed Mar 21, 2021
1 parent a0bb23a commit d3036b5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
20 changes: 12 additions & 8 deletions web/src/components/ConnectionIssuesIndicator.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import {Box, CircularProgress, Typography} from "@material-ui/core";
import {Box, CircularProgress, IconButton, Tooltip, Typography} from "@material-ui/core";

const ConnectionIssuesIndicator = () => {
return (
<Box position="relative" display="inline-flex">
<CircularProgress color="inherit" thickness={6.0} size="24px"/>
<Box top={3} left={0} bottom={0} right={0} position="absolute" display="flex"
alignItems="center" justifyContent="center" fontWeight="fontWeightBold">
<Typography variant="button" component="div" color="inherit">!</Typography>
</Box>
</Box>
<Tooltip title="Connection is unstable">
<IconButton color="inherit">
<Box position="relative" display="inline-flex">
<CircularProgress color="inherit" thickness={6.0} size="24px"/>
<Box top={3} left={0} bottom={0} right={0} position="absolute" display="flex"
alignItems="center" justifyContent="center" fontWeight="fontWeightBold">
<Typography variant="button" component="div" color="inherit">!</Typography>
</Box>
</Box>
</IconButton>
</Tooltip>
);
}

Expand Down
10 changes: 6 additions & 4 deletions web/src/components/TrackButton.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import FastForwardIcon from "@material-ui/icons/FastForward";
import {IconButton} from "@material-ui/core";
import {IconButton, Tooltip} from "@material-ui/core";

const TrackButton = ({onClick}: { onClick: () => void }) => {
return (
<IconButton color="inherit" onClick={onClick}>
<FastForwardIcon/>
</IconButton>
<Tooltip title="Track DAG tips">
<IconButton color="inherit" onClick={onClick}>
<FastForwardIcon/>
</IconButton>
</Tooltip>
);
}

Expand Down

0 comments on commit d3036b5

Please sign in to comment.