Skip to content

Commit aa33fa0

Browse files
annawen1tw15eganabbeyhrt
committed
feat(progress-indicator): update to use carbon icons (#5122)
* feat(progress-indicator): update to use carbon icons * fix(progress-indicator): remove top margin from icon Co-authored-by: TJ Egan <tw15egan@gmail.com> Co-authored-by: Abbey Hart <abbeyhrt@gmail.com>
1 parent e72508e commit aa33fa0

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

packages/components/docs/sass.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -20476,10 +20476,13 @@ Progress indicator styles
2047620476
}
2047720477

2047820478
.#{$prefix}--progress-step--current svg {
20479-
width: 14px;
20480-
height: 14px;
20479+
stroke: $interactive-01;
2048120480
fill: $interactive-01;
2048220481
margin-top: rem(9.5px);
20482+
20483+
path:last-of-type {
20484+
stroke-width: 40%;
20485+
}
2048320486
}
2048420487

2048520488
//INCOMPLETE STYLING

packages/components/src/components/progress-indicator/_progress-indicator.scss

+5-3
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,12 @@
143143
}
144144

145145
.#{$prefix}--progress-step--current svg {
146-
width: 14px;
147-
height: 14px;
146+
stroke: $interactive-01;
148147
fill: $interactive-01;
149-
margin-top: rem(9.5px);
148+
149+
path:last-of-type {
150+
stroke-width: 40%;
151+
}
150152
}
151153

152154
//INCOMPLETE STYLING

packages/react/src/components/ProgressIndicator/ProgressIndicator.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ import PropTypes from 'prop-types';
99
import React, { Component } from 'react';
1010
import classnames from 'classnames';
1111
import { settings } from 'carbon-components';
12-
import { CheckmarkOutline16, Warning16 } from '@carbon/icons-react';
12+
import {
13+
CheckmarkOutline16,
14+
Warning16,
15+
RadioButtonChecked16,
16+
RadioButton16,
17+
} from '@carbon/icons-react';
1318
import { keys, matches } from '../../internal/keyboard';
1419

1520
const { prefix } = settings;
@@ -61,10 +66,9 @@ export function ProgressStep({
6166
}
6267
if (current) {
6368
return (
64-
<svg>
65-
<path d="M 7, 7 m -7, 0 a 7,7 0 1,0 14,0 a 7,7 0 1,0 -14,0" />
69+
<RadioButtonChecked16>
6670
<title>{description}</title>
67-
</svg>
71+
</RadioButtonChecked16>
6872
);
6973
}
7074
if (complete) {
@@ -75,10 +79,9 @@ export function ProgressStep({
7579
);
7680
}
7781
return (
78-
<svg>
82+
<RadioButton16>
7983
<title>{description}</title>
80-
<path d="M8 1C4.1 1 1 4.1 1 8s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7zm0 13c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6z" />
81-
</svg>
84+
</RadioButton16>
8285
);
8386
};
8487

0 commit comments

Comments
 (0)