diff --git a/components/content/example.vue b/components/content/example.vue index c7197e8..206537a 100644 --- a/components/content/example.vue +++ b/components/content/example.vue @@ -1,177 +1,42 @@ diff --git a/components/examples/alert.vue b/components/examples/alert.vue new file mode 100644 index 0000000..190b6bf --- /dev/null +++ b/components/examples/alert.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/components/examples/confirm.vue b/components/examples/confirm.vue new file mode 100644 index 0000000..9ebe028 --- /dev/null +++ b/components/examples/confirm.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/components/examples/dialog.vue b/components/examples/dialog.vue new file mode 100644 index 0000000..f011d34 --- /dev/null +++ b/components/examples/dialog.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/components/examples/input.vue b/components/examples/input.vue new file mode 100644 index 0000000..32a7619 --- /dev/null +++ b/components/examples/input.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/components/examples/toast.vue b/components/examples/toast.vue new file mode 100644 index 0000000..cab99b9 --- /dev/null +++ b/components/examples/toast.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/composables/useObjectToString.ts b/composables/useObjectToString.ts new file mode 100644 index 0000000..b190278 --- /dev/null +++ b/composables/useObjectToString.ts @@ -0,0 +1,10 @@ +export const useObjectToString = (obj: any) => { + return JSON.stringify(obj, (key, value) => { + if (value) { + return typeof value === 'function' ? key : value + } + }, 2) + .replace(': "onSubmit"', ': (data) => console.log("Submit data", data)') + .replace(': "onClick"', ': () => console.log("Toast clicked")') + .replace(': "onClose"', ': () => console.log("Close")') +}