click
Description
Adds a click handler to the Two State buttonUsage
onclick?: (ev: MouseEvent) => void;
Parameters
- ev - (object) a native HTML click event object
Example
<script>
function myFunction() {
showNotice({
text: "Two State Button clicked",
});
}
</script>
<div>
<TwoState onclick={myFunction}>Click Me</TwoState>
</div>
Related articles: Handling a button click, Making a button inactive
Related sample: Two State Button