Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui5-progress-indicator): introduce "bar" CSS part #8599

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat(ui5-progress-indicator): introduce "bar" CSS part
Related to: #6140
kineticjs committed Apr 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit bd85933e85a566cde438d363fdc8c9f86e4ac5a1
2 changes: 1 addition & 1 deletion packages/main/src/ProgressIndicator.hbs
Original file line number Diff line number Diff line change
@@ -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}}
1 change: 1 addition & 0 deletions packages/main/src/ProgressIndicator.ts
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions packages/main/test/pages/ProgressIndicator.html
Original file line number Diff line number Diff line change
@@ -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>
9 changes: 9 additions & 0 deletions packages/main/test/pages/styles/ProgressIndicator.css
Original file line number Diff line number Diff line change
@@ -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);
}