Skip to content

Commit cb04c79

Browse files
authored
fix(APP-4280): Fix style of threshold indicator on Progress component (#502)
1 parent 3efaf5b commit cb04c79

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

.changeset/cute-boats-create.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@aragon/gov-ui-kit': patch
3+
---
4+
5+
Fix style of threshold indicator on `<Progress />` core component

src/core/components/progress/progress.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ const responsiveSizeClassNames: ResponsiveAttributeClassMap<ProgressSize> = {
2525

2626
const responsiveIndicatorSizeClassNames: ResponsiveAttributeClassMap<ProgressSize> = {
2727
sm: {
28-
default: 'h-2 -top-1/2',
29-
sm: 'sm:h-2 sm:-top-1/2',
30-
md: 'md:h-2 md:-top-1/2',
31-
lg: 'lg:h-2 lg:-top-1/2',
32-
xl: 'xl:h-2 xl:-top-1/2',
33-
'2xl': '2xl:h-2 2xl:-top-1/2',
28+
default: 'h-3 -top-1',
29+
sm: 'sm:h-3 sm:-top-1',
30+
md: 'md:h-3 md:-top-1',
31+
lg: 'lg:h-3 lg:-top-1',
32+
xl: 'xl:h-3 xl:-top-1',
33+
'2xl': '2xl:h-3 2xl:-top-1',
3434
},
3535
md: {
3636
default: 'h-4 -top-1',
@@ -86,16 +86,17 @@ export const Progress: React.FC<IProgressProps> = (props) => {
8686
style={{ transform: `translateX(-${(100 - processedValue).toString()}%)` }}
8787
/>
8888
</RadixProgress.Root>
89-
{processedIndicator && (
89+
{processedIndicator != null && (
9090
<div
9191
data-testid="progress-indicator"
9292
data-value={processedIndicator}
93-
className={classNames('absolute flex self-center', indicatorSizeClassNames)}
93+
className={classNames(
94+
'border-neutral-0 absolute flex self-center border-2',
95+
indicatorSizeClassNames,
96+
)}
9497
style={{ left: `${processedIndicator.toString()}%`, transform: 'translateX(-50%)' }}
9598
>
96-
<div className="h-full w-0.5 bg-neutral-50" />
9799
<div className="h-full w-0.5 rounded-full bg-neutral-400" />
98-
<div className="h-full w-0.5 bg-neutral-50" />
99100
</div>
100101
)}
101102
</div>

0 commit comments

Comments
 (0)