We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5b586d commit 4970577Copy full SHA for 4970577
playground/app.vue
@@ -27,7 +27,7 @@
27
</template>
28
</ListmonkInputGroup>
29
30
- <ListmonkButton title="Send" />
+ <ListmonkButton>Send</ListmonkButton>
31
</ListmonkForm>
32
</div>
33
src/runtime/components/ListmonkButton.vue
@@ -1,14 +1,22 @@
1
<script setup lang="ts">
2
defineProps<{
3
type?: string
4
- title: string
+ title?: string
5
}>()
6
+
7
+const slots = useSlots()
8
</script>
9
10
<template>
11
<button
12
:type="type || 'submit'"
13
>
- {{ title }}
14
+ <template v-if="slots.default">
15
+ <slot />
16
+ </template>
17
18
+ <template v-else>
19
+ {{ title }}
20
21
</button>
22
0 commit comments