Skip to content

Commit

Permalink
feat(ui5-progress-indicator): introduce "bar" CSS part (#8599)
Browse files Browse the repository at this point in the history
Related to: #6140
  • Loading branch information
kineticjs authored Apr 2, 2024
1 parent 2072b2e commit 831fad3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/main/src/ProgressIndicator.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
aria-disabled="{{_ariaDisabled}}"
aria-label="{{accessibleName}}"
>
<div class="ui5-progress-indicator-bar" style="{{styles.bar}}">
<div class="ui5-progress-indicator-bar" part="bar" style="{{styles.bar}}">
{{#unless showValueInRemainingBar}}
{{> valueLabel}}
{{/unless}}
Expand Down
1 change: 1 addition & 0 deletions packages/main/src/ProgressIndicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import ProgressIndicatorCss from "./generated/themes/ProgressIndicator.css.js";
* ### ES6 Module Import
*
* `import "@ui5/webcomponents/dist/ProgressIndicator.js";`
* @csspart bar - Used to style the main bar of the `ui5-progress-indicator`
* @csspart remaining-bar - Used to style the remaining bar of the `ui5-progress-indicator`
* @constructor
* @extends UI5Element
Expand Down
4 changes: 4 additions & 0 deletions packages/main/test/pages/ProgressIndicator.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
<br />
<ui5-progress-indicator value="25" class="progressindicator2auto"></ui5-progress-indicator>
<br />
Custom Color
<br />
<ui5-progress-indicator value="25" class="progressindicator3auto"></ui5-progress-indicator>
<br />
Test progress indicator
<br />
<ui5-progress-indicator id="test-progress-indicator"></ui5-progress-indicator>
Expand Down
9 changes: 9 additions & 0 deletions packages/main/test/pages/styles/ProgressIndicator.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@
height: 50px;
width: 200px;
}

.progressindicator3auto::part(bar),
.progressindicator3auto::part(remaining-bar)::after {
background-color: rgb(255, 0, 0);
}

.progressindicator3auto::part(remaining-bar) {
background-color: rgb(255, 225, 225);
}

0 comments on commit 831fad3

Please sign in to comment.