Skip to content

Commit 38244d6

Browse files
fix(progress-indicator): fix spacing for skeleton progress label (#12332)
* fix(progress-indicator): fix spacing for skeleton progress label * chore(contributors): adds to the contributors list * feat(progress-indicator): add vertical prop to ProgressIndicatorSkeleton * test(progress-indicator): update test snapshot with props Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent d98b923 commit 38244d6

File tree

5 files changed

+49
-2
lines changed

5 files changed

+49
-2
lines changed

.all-contributorsrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,33 @@
904904
"contributions": [
905905
"code"
906906
]
907+
},
908+
{
909+
"login": "torresga",
910+
"name": "G. Torres",
911+
"avatar_url": "https://avatars.githubusercontent.com/u/6892410?v=4",
912+
"profile": "http://torresga.github.io/",
913+
"contributions": [
914+
"code"
915+
]
916+
},
917+
{
918+
"login": "FionaDL",
919+
"name": "Fiona",
920+
"avatar_url": "https://avatars.githubusercontent.com/u/28625558?v=4",
921+
"profile": "https://github.com/FionaDL",
922+
"contributions": [
923+
"code"
924+
]
925+
},
926+
{
927+
"login": "kindoflew",
928+
"name": "kindoflew",
929+
"avatar_url": "https://avatars.githubusercontent.com/u/70274722?v=4",
930+
"profile": "https://lewisdavanzo.com/",
931+
"contributions": [
932+
"code"
933+
]
907934
}
908935
],
909936
"commitConvention": "none"

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
202202
</tr>
203203
<tr>
204204
<td align="center"><a href="https://github.com/hannelevaltanen"><img src="https://avatars.githubusercontent.com/u/26527460?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hannele Valtanen</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=hannelevaltanen" title="Code">💻</a></td>
205+
<td align="center"><a href="http://torresga.github.io/"><img src="https://avatars.githubusercontent.com/u/6892410?v=4?s=100" width="100px;" alt=""/><br /><sub><b>G. Torres</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=torresga" title="Code">💻</a></td>
206+
<td align="center"><a href="https://github.com/FionaDL"><img src="https://avatars.githubusercontent.com/u/28625558?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Fiona</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=FionaDL" title="Code">💻</a></td>
207+
<td align="center"><a href="https://lewisdavanzo.com/"><img src="https://avatars.githubusercontent.com/u/70274722?v=4?s=100" width="100px;" alt=""/><br /><sub><b>kindoflew</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=kindoflew" title="Code">💻</a></td>
205208
</tr>
206209
</table>
207210

packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5594,6 +5594,9 @@ Map {
55945594
"className": Object {
55955595
"type": "string",
55965596
},
5597+
"vertical": Object {
5598+
"type": "bool",
5599+
},
55975600
},
55985601
},
55995602
"ProgressStep" => Object {

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@ function Step() {
2626
);
2727
}
2828

29-
function ProgressIndicatorSkeleton({ className, ...rest }) {
29+
function ProgressIndicatorSkeleton({ className, vertical, ...rest }) {
3030
const prefix = usePrefix();
3131
return (
3232
<ul
33-
className={cx(`${prefix}--progress`, `${prefix}--skeleton`, className)}
33+
className={cx(
34+
`${prefix}--progress`,
35+
`${prefix}--skeleton`,
36+
{ [`${prefix}--progress--vertical`]: vertical },
37+
className
38+
)}
3439
{...rest}>
3540
<Step />
3641
<Step />
@@ -45,6 +50,10 @@ ProgressIndicatorSkeleton.propTypes = {
4550
* Specify an optional className to add.
4651
*/
4752
className: PropTypes.string,
53+
/**
54+
* Determines whether or not the ProgressIndicator should be rendered vertically.
55+
*/
56+
vertical: PropTypes.bool,
4857
};
4958

5059
export default ProgressIndicatorSkeleton;

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,11 @@ $progress-indicator-bar-width: 1px inset transparent !default;
273273
margin-top: 0.625rem;
274274
}
275275

276+
.#{$prefix}--progress.#{$prefix}--progress--vertical.#{$prefix}--skeleton
277+
.#{$prefix}--progress-label {
278+
margin-top: 0.0625rem;
279+
}
280+
276281
// Vertical Variant
277282

278283
.#{$prefix}--progress--vertical {

0 commit comments

Comments
 (0)