Button View Model
Convenience class to provide common properties for buttons with a single reference. In addition to the look & feel of the button (such as image, text, actionType, etc.) and its behavior (such as onClick), it supports specifying a custom tag that makes it easily identifiable in tests.
The image to show next to the text within the button.
The text to show within the button.
Indicates whether the button is enabled.
Indicates whether the button is activated. This can be used for toggle buttons.
Indicates if the button is visible. If no value is provided, the button is visible only if it has an image and/or text.
Indicates if a badge should be shown on top of the button. The badge signifies that there is update relevant to the user that can be accessed by clicking the button.
An ID to tag the button with, which can be used to identify it later. This is useful, for example, during tests in combination with the
Callback function for when the button is clicked.
Callback function for when the button is clicked when in disabled state.