Files
archived-chatwoot/app/javascript/entrypoints/ui.js
2025-05-07 19:32:22 +05:30

29 lines
477 B
JavaScript

import { h, defineCustomElement } from 'vue';
const ChatButton = {
name: 'ChatButton',
props: {
label: {
type: String,
default: 'Click me',
},
},
render() {
return h(
'button',
{
class: 'cha-button',
onClick: this.handleClick,
},
this.label
);
},
methods: {
handleClick() {
// console.log('Button clicked');
},
},
};
export const buttonElement = defineCustomElement(ChatButton);