-
Notifications
You must be signed in to change notification settings - Fork 561
/
Component.story.vue
42 lines (35 loc) · 940 Bytes
/
Component.story.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<script>
import VueDraggableResizable from '@/components/vue-draggable-resizable.vue'
import '@/components/vue-draggable-resizable.css'
import { defineComponent } from 'vue'
export default defineComponent({
components: {
VueDraggableResizable,
},
data () {
return {
className: 'my-class'
}
},
})
</script>
<template>
<Story auto-props-disabled title="Class Name prop">
<vue-draggable-resizable :class-name="className">
<p>You can provide a default class name for the component using the <b>class-name</b> prop.</p>
</vue-draggable-resizable>
<template #controls>
<HstText v-model="className" title="Class Name" />
</template>
</Story>
</template>
<docs lang="md">
## Component with custom class name
Component with a custom class name, provided with the prop `:class-name`.
```css
.my-class {
background-color: green;
border: 1px solid red;
}
```
</docs>