feat: kickstart ui
This commit is contained in:
@@ -1,3 +1,28 @@
|
||||
export function greet() {
|
||||
return 'Hello';
|
||||
}
|
||||
import { h, createCustomElement } 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 = createCustomElement(ChatButton);
|
||||
|
||||
Reference in New Issue
Block a user