Skip to content

Commit f4cf8ba

Browse files
committed
🐛 click-event of muc-button now contains original click-event for further manipulation
1 parent 5bf6d7b commit f4cf8ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/Button/MucButton.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<button
3-
@click="handleClick"
3+
@click="handleClick($event)"
44
:aria-disabled="disabled"
55
class="m-button"
66
:class="{
@@ -89,22 +89,22 @@ const emit = defineEmits<
8989
* Triggered when button is clicked.
9090
* @param e Click-Event
9191
*/
92-
(e: "click") => void
92+
(e: "click", value: Event) => void
9393
>();
9494
9595
const animateIconSpin = ref(false);
9696
9797
/**
9898
* Emit a click event if not in disabled state.
9999
*/
100-
const handleClick = () => {
100+
const handleClick = (event: Event) => {
101101
if (spinIconOnClick) {
102102
animateIconSpin.value = true;
103103
setTimeout(() => {
104104
animateIconSpin.value = false;
105105
}, 1000);
106106
}
107-
if (!disabled) emit("click");
107+
if (!disabled) emit("click", event);
108108
};
109109
</script>
110110

0 commit comments

Comments
 (0)