Skip to content

Commit

Permalink
fix colors on progress button (closes #240)
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoBSalgueiro committed Mar 16, 2024
1 parent bbd1bb8 commit cc53186
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/components/common/ProgressButton.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ export const progress = style({
});

export const label = style({
position: "relative",
zIndex: 1,
[vars.darkSelector]: {
color: vars.colors.gray["3"],
},
[vars.lightSelector]: {
color: vars.colors.gray["9"],
},
});
7 changes: 4 additions & 3 deletions src/components/common/ProgressButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Progress, useMantineTheme } from "@mantine/core";
import { Box, Button, Progress, useMantineTheme } from "@mantine/core";
import {
type EventCallback,
type UnlistenFn,
Expand Down Expand Up @@ -81,9 +81,10 @@ function ProgressButton<T extends Payload>({
}}
color={completed ? "green" : theme.primaryColor}
disabled={inProgress || (completed && !redoable) || disabled}
leftSection={leftIcon}
leftSection={<Box className={classes.label}>{leftIcon}</Box>}
autoContrast
>
<div className={classes.label}>{label}</div>
<span className={classes.label}>{label}</span>
{progress !== 0 && (
<Progress
pos="absolute"
Expand Down

0 comments on commit cc53186

Please sign in to comment.