Skip to content

Commit 5c9a8f6

Browse files
committed
docs: Add documentation about ListmonkButton slot
1 parent 4970577 commit 5c9a8f6

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

docs/content/2.components/4.ListmonkButton.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,44 @@
3737
::
3838
::
3939

40+
If you want more control over button's content you can define some content like an icon or another component inside the default slot.
41+
42+
::code-group
43+
::code-block{label="Unstyled"}
44+
```vue
45+
<template>
46+
<ListmonkForm>
47+
<ListmonkButton>
48+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
49+
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4 12h16m0 0l-6-6m6 6l-6 6"/>
50+
</svg>
51+
</ListmonkButton>
52+
</ListmonkForm>
53+
</template>
54+
```
55+
::
56+
57+
::code-block{label="Styled"}
58+
```vue
59+
<template>
60+
<ListmonkForm>
61+
<ListmonkButton class="button">
62+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
63+
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4 12h16m0 0l-6-6m6 6l-6 6"/>
64+
</svg>
65+
</ListmonkButton>
66+
</ListmonkForm>
67+
</template>
68+
69+
<style scoped>
70+
.button {
71+
...
72+
}
73+
</style>
74+
```
75+
::
76+
::
77+
4078
## Props
4179

4280
**ListmonkButton** component has two props:

0 commit comments

Comments
 (0)