Skip to content

Commit b03e21f

Browse files
committed
chore(progress-bar): add deprecation warning for over-background
1 parent 2659257 commit b03e21f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.changeset/easy-jobs-brush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@spectrum-web-components/progress-bar': patch
3+
---
4+
5+
**Added**: Deprecation warning for the over-background attribute.

packages/progress-bar/src/ProgressBar.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,15 @@ export class ProgressBar extends SizedMixin(
145145
}
146146
}
147147

148+
if (change.has('over-background') && window.__swc.DEBUG) {
149+
window.__swc.warn(
150+
this,
151+
`The "over-background" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use "static-color='white'" instead.`,
152+
'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#variants',
153+
{ level: 'deprecation' }
154+
);
155+
}
156+
148157
if (window.__swc.DEBUG) {
149158
if (
150159
!this.label &&

0 commit comments

Comments
 (0)