fix(components): use v-if on slots instead of lock icons

This commit is contained in:
bcakmakoglu
2022-06-24 14:41:09 +02:00
parent c27c895f88
commit a183c7dced
@@ -79,11 +79,11 @@ export default {
<template v-if="showInteractive"> <template v-if="showInteractive">
<slot name="control-interactive"> <slot name="control-interactive">
<ControlButton v-if="showInteractive" class="vue-flow__controls-interactive" @click="onInteractiveChangeHandler"> <ControlButton v-if="showInteractive" class="vue-flow__controls-interactive" @click="onInteractiveChangeHandler">
<slot name="icon-unlock"> <slot v-if="isInteractive" name="icon-unlock">
<Unlock v-if="isInteractive" /> <Unlock />
</slot> </slot>
<slot name="icon-lock"> <slot v-if="!isInteractive" name="icon-lock">
<Lock v-if="!isInteractive" /> <Lock />
</slot> </slot>
</ControlButton> </ControlButton>
</slot> </slot>