forked from mauricius/vue-draggable-resizable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScale.story.vue
38 lines (32 loc) · 1.09 KB
/
Scale.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
<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 {
scale: 1
}
}
})
</script>
<template>
<Story auto-props-disabled title="Scale prop" v-bind:style="{ transform: 'scale(' + scale + ')' }">
<vue-draggable-resizable :scale="scale">
<p>Change the "scale" property to support CSS scale transform. Current value is {{ scale }}</p>
</vue-draggable-resizable>
<vue-draggable-resizable :x="250">
<p>Component with default scale prop set to 1</p>
</vue-draggable-resizable>
<template #controls>
<HstNumber v-model="scale" :step="1" title="Scale" />
</template>
</Story>
</template>
<docs lang="md">
## Basic component with scale prop
A basic component, with `:scale` prop to control the scale property when the CSS 3 scale transformation is applied to one of the parent elements. If not provided the default value is `1`.
</docs>