Skip to content

Commit

Permalink
Merge pull request #337 from pshenmic/feat/withdrawals-list-item
Browse files Browse the repository at this point in the history
Add tooltip to withdrawals status
  • Loading branch information
pshenmic authored Dec 9, 2024
2 parents e9b04c8 + 46026bb commit ededb3c
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
import { SuccessIcon, ErrorIcon, QueuedIcon, PooledIcon, BroadcastedIcon } from '../../ui/icons'
import { Tooltip } from '../../ui/Tooltips'

function StatusIcon ({ status, ...props }) {
const StatusIcons = {
0: <QueuedIcon {...props}/>,
1: <PooledIcon {...props}/>,
2: <BroadcastedIcon {...props}/>,
3: <SuccessIcon {...props}/>,
4: <ErrorIcon {...props}/>,
QUEUED: <QueuedIcon {...props}/>,
POOLED: <PooledIcon {...props}/>,
BROADCASTED: <BroadcastedIcon {...props}/>,
COMPLETE: <SuccessIcon {...props}/>,
EXPIRED: <ErrorIcon {...props}/>
}

return StatusIcons[status] || <></>
const tooltipTitle = {
QUEUED: 'Queued',
POOLED: 'Pooled',
BROADCASTED: 'Broadcasted',
COMPLETE: 'Complete',
EXPIRED: 'Expired'
}

return StatusIcons[status]
? <Tooltip title={tooltipTitle[status]} placement={'top'}>
<span>{StatusIcons[status]}</span>
</Tooltip>
: null
}

export default StatusIcon

0 comments on commit ededb3c

Please sign in to comment.