Skip to content

Commit e0ec6ff

Browse files
committed
feat(design-system): CR changes v1 [AR-26986]
1 parent 5292a63 commit e0ec6ff

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

packages/design-system/src/components/ds-progress-linear/ds-progress-linear.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ $border-radius: 4px;
8484
display: flex;
8585
align-items: center;
8686
gap: var(--spacing-3xs);
87-
padding-top: 2px;
87+
padding-top: var(--spacing-4xs);
8888
}
8989

9090
.captionDefault {

packages/design-system/src/components/ds-progress-linear/ds-progress-linear.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,15 @@ const DsProgressLinear = ({
5858
ref,
5959
}: DsProgressLinearProps) => {
6060
const hasHeader = label !== undefined || showValue;
61-
const isStringCaption = typeof caption === 'string';
6261
const icon = captionIcon[variant];
63-
6462
const percentage = calculatePercentage(value, min, max);
6563

66-
const renderCaption = () => {
64+
const renderCaption = (caption?: DsProgressLinearProps['caption']) => {
6765
if (caption === undefined) {
6866
return null;
6967
}
7068

71-
if (!isStringCaption) {
69+
if (typeof caption !== 'string') {
7270
return caption;
7371
}
7472

@@ -101,7 +99,7 @@ const DsProgressLinear = ({
10199
<Progress.Range className={classNames(styles.range, rangeVariantClass[variant])} />
102100
</Progress.Track>
103101

104-
{renderCaption()}
102+
{renderCaption(caption)}
105103
</Progress.Root>
106104
);
107105
};

0 commit comments

Comments
 (0)