@@ -12,7 +12,10 @@ import {
1212 <div class="bx--inline-loading__animation">
1313 <div
1414 *ngIf="success === false"
15- class="bx--loading bx--loading--small">
15+ class="bx--loading bx--loading--small"
16+ [ngClass]="{
17+ 'bx--loading--stop': !isActive
18+ }">
1619 <svg class="bx--loading__svg" viewBox="-75 -75 150 150">
1720 <circle cx="0" cy="0" r="37.5"></circle>
1821 </svg>
@@ -30,22 +33,20 @@ import {
3033export class InlineLoading {
3134 /**
3235 * Specify the text description for the loading state.
33- *
34- * @memberof InlineLoading
3536 */
3637 @Input ( ) loadingText ;
3738 /**
3839 * Specify the text description for the success state.
39- *
40- * @memberof InlineLoading
4140 */
4241 @Input ( ) successText ;
4342 /**
4443 * Provide a delay for the `setTimeout` for success.
45- *
46- * @memberof InlineLoading
4744 */
4845 @Input ( ) successDelay = 1500 ;
46+ /**
47+ * set to `false` to stop the loading animation
48+ */
49+ @Input ( ) isActive = true ;
4950
5051 /**
5152 * Returns value `true` if the component is in the success state.
@@ -69,16 +70,13 @@ export class InlineLoading {
6970 * Emits event after the success state is active
7071 *
7172 * @type {EventEmitter<any> }
72- * @memberof InlineLoading
7373 */
7474 @Output ( ) onSuccess : EventEmitter < any > = new EventEmitter ( ) ;
7575
7676 @HostBinding ( "class.bx--inline-loading" ) loadingClass = true ;
7777
7878 /**
7979 * Set to `true` if the action is completed successfully.
80- *
81- * @memberof InlineLoading
8280 */
8381 protected _success = false ;
8482}
0 commit comments