refactor: Destructure props with reactivity transform

This commit is contained in:
Braks
2022-04-24 13:34:22 +02:00
parent e722f49e6e
commit dc1d71d0bd
12 changed files with 182 additions and 176 deletions
@@ -6,7 +6,7 @@ interface SelectionRectProps {
y: number
}
const props = defineProps<SelectionRectProps>()
const { width, height, x, y } = defineProps<SelectionRectProps>()
</script>
<script lang="ts">
export default {
@@ -17,9 +17,9 @@ export default {
<div
class="vue-flow__selection"
:style="{
width: `${props.width}px`,
height: `${props.height}px`,
transform: `translate(${props.x}px, ${props.y}px)`,
width: `${width}px`,
height: `${height}px`,
transform: `translate(${x}px, ${y}px)`,
}"
/>
</template>