From 5e034a93257f24098b32f07faef803eabef44f28 Mon Sep 17 00:00:00 2001 From: George Knee Date: Thu, 21 Sep 2023 09:30:36 +0100 Subject: [PATCH] reverse direction of download progress button --- packages/payment-proxy-client/src/App.tsx | 6 +++++- packages/payment-proxy-client/src/ProgressButton.tsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/payment-proxy-client/src/App.tsx b/packages/payment-proxy-client/src/App.tsx index 014fa8b30..e60d740d2 100644 --- a/packages/payment-proxy-client/src/App.tsx +++ b/packages/payment-proxy-client/src/App.tsx @@ -429,7 +429,11 @@ export default function App() { disabled={fetchInProgress || downloadProgress == 100} style={ { - "--fill-percentage": `${downloadProgress}%`, + "--fill-percentage": `${ + useMicroPayments && fetchInProgress + ? downloadProgress + : 100 + }%`, "--primary-color": theme.palette.primary.main, } as React.CSSProperties } diff --git a/packages/payment-proxy-client/src/ProgressButton.tsx b/packages/payment-proxy-client/src/ProgressButton.tsx index 3ff8b7b2b..e8b99cb1f 100644 --- a/packages/payment-proxy-client/src/ProgressButton.tsx +++ b/packages/payment-proxy-client/src/ProgressButton.tsx @@ -3,7 +3,7 @@ import { Button, ButtonProps } from "@mui/material"; import { styled } from "@mui/system"; const CustomButton = styled(Button)({ - background: `linear-gradient(90deg, transparent 0%, transparent var(--fill-percentage), var(--primary-color) var(--fill-percentage), var(--primary-color) 100%)`, + background: `linear-gradient(90deg, var(--primary-color) 0%, var(--primary-color) var(--fill-percentage), transparent var(--fill-percentage), transparent 100%)`, }) as React.FC; export default CustomButton;