Skip to content

Commit

Permalink
reverse direction of download progress button
Browse files Browse the repository at this point in the history
  • Loading branch information
geoknee committed Sep 21, 2023
1 parent cbc1974 commit 5e034a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/payment-proxy-client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion packages/payment-proxy-client/src/ProgressButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<ButtonProps>;

export default CustomButton;

0 comments on commit 5e034a9

Please sign in to comment.