Skip to content

Commit 691fd0a

Browse files
committed
swap: display swap status label in Processing Loops
1 parent 787a25e commit 691fd0a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/src/components/loop/processing/SwapProgress.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,19 @@ const Styled = {
2525
height: 100%;
2626
display: flex;
2727
flex-direction: column;
28-
justify-content: center;
2928
`,
3029
Track: styled.div`
3130
height: 3px;
3231
background-color: #464d62;
3332
border: 1px solid #5a6276;
3433
border-radius: 2px;
3534
`,
35+
Status: styled.div<{ pct: number }>`
36+
width: ${props => props.pct}%;
37+
text-align: right;
38+
font-size: ${props => props.theme.sizes.xs};
39+
transition: all 1s;
40+
`,
3641
Fill: styled.div<{ state: number; pct: number }>`
3742
height: 1px;
3843
width: ${props => props.pct}%;
@@ -50,9 +55,10 @@ const SwapProgress: React.FC<Props> = ({ swap }) => {
5055
const steps = progressSteps[swap.type];
5156
const pct = Math.floor(((steps.indexOf(swap.state) + 1) / steps.length) * 100);
5257

53-
const { Wrapper, Track, Fill } = Styled;
58+
const { Wrapper, Status, Track, Fill } = Styled;
5459
return (
5560
<Wrapper>
61+
<Status pct={pct}>{swap.stateLabel}</Status>
5662
<Track>
5763
<Fill state={swap.state} pct={pct} title={swap.stateLabel} />
5864
</Track>

0 commit comments

Comments
 (0)