mirror of
https://github.com/lingble/chatwoot.git
synced 2026-03-20 03:52:43 +00:00
29 lines
477 B
JavaScript
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);
|