import LoadingButtonController from '~/controllers/LoadingButtonController.js'
LoadingButtonController
Extends:
Direct Subclass:
Allows button classes with images to have a loading/disabled state. Expects an SVG as the image.
This is a better version of ProgressButtonController that supports reactive observables.
Constructor Summary
Public Constructor | ||
public |
constructor(button: HTMLElement) Creates a button to wrap the thing. |
Member Summary
Public Members | ||
public |
button: HTMLElement |
|
public set |
If the button is in progress |
Method Summary
Public Methods | ||
public |
observeClick(): Observable Observes the click of the button |
Inherited Summary
From class ViewController | ||
public static |
Creates a view controller directly for all members of a class. |
|
public static |
of(elem: string | Element): ViewController Returns a canolical VC of an element if it exists |
From class ProgressButtonController | ||
public |
button: HTMLElement |
|
public |
buttonChildren: HTMLElement[] |
|
public |
|
|
public |
|
|
public |
setLoadingState(isLoading: Boolean) Sets into a loading state |
Public Constructors
public constructor(button: HTMLElement) source
Creates a button to wrap the thing.
Override:
ProgressButtonController#constructorParams:
Name | Type | Attribute | Description |
button | HTMLElement | The element with desired default children. |