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: ensure global hidden attribute is honored for all components #5059

Merged
14 changes: 10 additions & 4 deletions src/components/loader/loader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,17 @@ $loader-circumference: ($loader-scale - (2 * $stroke-width)) * 3.14159;
}

:host {
@apply hidden;
}
visibility: hidden;

:host([active]) {
@apply flex;
&:host([hidden]) {
Elijbet marked this conversation as resolved.
Show resolved Hide resolved
visibility: hidden !important;
}
&:host:not([hidden]) {
@apply flex;
}
&:host([active]) {
@apply flex;
}
}

.loader__text {
Expand Down
7 changes: 6 additions & 1 deletion src/components/loader/loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ export class Loader {
// Properties
//
//--------------------------------------------------------------------------
/** When true, the component is active. */

/**
* When true, activates the loader
*
* @deprecated use global hidden attribute instead
*/
@Prop({ reflect: true }) active = false;

/** When true, displays smaller and appears to the left of the text. */
Expand Down