mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(editor): Move editor-ui and design-system to frontend dir (no-changelog) (#13564)
This commit is contained in:
34
packages/frontend/editor-ui/src/components/ModalRoot.vue
Normal file
34
packages/frontend/editor-ui/src/components/ModalRoot.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<script setup lang="ts">
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
|
||||
defineProps<{
|
||||
name: string;
|
||||
keepAlive?: boolean;
|
||||
}>();
|
||||
|
||||
defineSlots<{
|
||||
default: {
|
||||
modalName: string;
|
||||
active: boolean;
|
||||
open: boolean;
|
||||
activeId: string;
|
||||
mode: string;
|
||||
data: Record<string, unknown>;
|
||||
};
|
||||
}>();
|
||||
|
||||
const uiStore = useUIStore();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="uiStore.modalsById[name].open || keepAlive">
|
||||
<slot
|
||||
:modal-name="name"
|
||||
:active="uiStore.isModalActiveById[name]"
|
||||
:open="uiStore.modalsById[name].open"
|
||||
:active-id="uiStore.modalsById[name].activeId"
|
||||
:mode="uiStore.modalsById[name].mode"
|
||||
:data="uiStore.modalsById[name].data"
|
||||
></slot>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user