update: Add names to components
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { ButtonHTMLAttributes } from 'vue'
|
||||
|
||||
export interface ControlButtonProps extends ButtonHTMLAttributes {}
|
||||
|
||||
const props: any = defineProps<ControlButtonProps>()
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'ControlButton',
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<button class="vue-flow__controls-button" v-bind="props">
|
||||
<button class="vue-flow__controls-button">
|
||||
<slot></slot>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts" setup>
|
||||
import { HTMLAttributes } from 'vue'
|
||||
import { FitViewParams } from '../../types'
|
||||
import { useZoomPanHelper, useStore } from '../../composables'
|
||||
import ControlButton from './ControlButton.vue'
|
||||
@@ -9,7 +8,7 @@ import Fitview from '~/assets/icons/fitview.svg'
|
||||
import Lock from '~/assets/icons/lock.svg'
|
||||
import Unlock from '~/assets/icons/unlock.svg'
|
||||
|
||||
export interface ControlProps extends HTMLAttributes {
|
||||
interface ControlProps {
|
||||
showZoom?: boolean
|
||||
showFitView?: boolean
|
||||
showInteractive?: boolean
|
||||
@@ -55,6 +54,11 @@ const onInteractiveChangeHandler = () => {
|
||||
emit('interaction-change', !isInteractive.value)
|
||||
}
|
||||
</script>
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'Controls',
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="vue-flow__controls">
|
||||
<template v-if="props.showZoom">
|
||||
|
||||
Reference in New Issue
Block a user