-
Notifications
You must be signed in to change notification settings - Fork 253
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-busy-indicator): added property text-placement #8471
Conversation
…cator_text_placment
added example and additional test
added example and additional test
…omponents into busy_idicator_text_placment
updated sample
texts are updated
I approve the PR from UA perspective |
text-align: center; | ||
} | ||
|
||
.ui5-busy-indicator-text-placement-top { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some points for improvement.
Instead of creating, switching classes:
get classes() {
textPosition: {
"ui5-busy-indicator-text-placement-top ": this.textPlacement === BusyIndicatorTextPlacement.Top,
"ui5-busy-indicator-text-placement-bottom ": this.textPlacement === BusyIndicatorTextPlacement.Bottom,
},
}
.ui5-busy-indicator-text-placement-top {
margin-bottom: 0.5rem
}
.ui5-busy-indicator-text-placement-bottom {
margin-top: 0.5rem;
}
you can just add styles based on the attribute:
:host([text-placement="Top"]) .ui5-busy-indicator-text {
margin-bottom: 0.5rem
}
:host(:not([text-placement)) .ui5-busy-indicator-text,
:host([text-placement="Bottom"]) .ui5-busy-indicator-text {
margin-top: 0.5rem;
}
We do it like this when we can - when the conditions are simple enough to cover with attribute selectors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#8482 taking care of improvment
BGSOFUIRODOPI-3214
FIXES: #7701