From effbcb5bff14b4f5d2956ab90009668e7537950b Mon Sep 17 00:00:00 2001 From: Alan Gabriel Date: Tue, 12 Dec 2023 12:07:17 -0300 Subject: [PATCH 1/2] fix: maximum value for progressbar --- .../Templates/TeamComponent/ProgressBar/ProgressBar.styles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/Templates/TeamComponent/ProgressBar/ProgressBar.styles.ts b/packages/react/src/Templates/TeamComponent/ProgressBar/ProgressBar.styles.ts index a9069ba80..7c423afd9 100644 --- a/packages/react/src/Templates/TeamComponent/ProgressBar/ProgressBar.styles.ts +++ b/packages/react/src/Templates/TeamComponent/ProgressBar/ProgressBar.styles.ts @@ -57,7 +57,7 @@ const styles = createUseStyles((theme: Theme) => ( display: 'flex', position: 'absolute', right: '-5px', - left: ({ point }) => (point ? `${point - 10}%` : '0%'), + left: ({ point }) => (point ? `${Math.min(point, 100) - 10}%` : '0%'), top: '-8px', width: 56, height: 24, From 3f062c4300d607faa31aecbee460f50dc354e4f9 Mon Sep 17 00:00:00 2001 From: Alan Gabriel Date: Tue, 12 Dec 2023 12:20:08 -0300 Subject: [PATCH 2/2] fix: minimum value cannot be negative --- .../Templates/TeamComponent/ProgressBar/ProgressBar.styles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/Templates/TeamComponent/ProgressBar/ProgressBar.styles.ts b/packages/react/src/Templates/TeamComponent/ProgressBar/ProgressBar.styles.ts index 7c423afd9..615845dac 100644 --- a/packages/react/src/Templates/TeamComponent/ProgressBar/ProgressBar.styles.ts +++ b/packages/react/src/Templates/TeamComponent/ProgressBar/ProgressBar.styles.ts @@ -57,7 +57,7 @@ const styles = createUseStyles((theme: Theme) => ( display: 'flex', position: 'absolute', right: '-5px', - left: ({ point }) => (point ? `${Math.min(point, 100) - 10}%` : '0%'), + left: ({ point }) => (point ? `${Math.min(Math.max(point, 0), 100) - 10}%` : '0%'), top: '-8px', width: 56, height: 24,