refactor(core,additional-components): move panel component to core pkg
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<script lang="ts" setup>
|
||||
import type { PanelProps } from '../../types'
|
||||
|
||||
const props = defineProps<PanelProps>()
|
||||
|
||||
const { userSelectionActive } = useVueFlow()
|
||||
const positionClasses = computed(() => `${props.position}`.split('-'))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="vue-flow__panel" :class="positionClasses" :style="{ pointerEvents: userSelectionActive ? 'none' : 'all' }">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
@@ -7,6 +7,8 @@ export { default as VueFlow } from './container/VueFlow/VueFlow.vue'
|
||||
|
||||
export { default as Handle } from './components/Handle/Handle.vue'
|
||||
|
||||
export { default as Panel } from './components/Panel/Panel.vue'
|
||||
|
||||
export {
|
||||
StraightEdge,
|
||||
StepEdge,
|
||||
|
||||
@@ -8,3 +8,4 @@ export * from './store'
|
||||
export * from './hooks'
|
||||
export * from './changes'
|
||||
export * from './handle'
|
||||
export * from './panel'
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
export enum PanelPosition {
|
||||
TopLeft = 'top-left',
|
||||
TopCenter = 'top-center',
|
||||
TopRight = 'top-right',
|
||||
BottomLeft = 'bottom-left',
|
||||
BottomCenter = 'bottom-center',
|
||||
BottomRight = 'bottom-right',
|
||||
}
|
||||
|
||||
export interface PanelProps {
|
||||
position: PanelPosition
|
||||
}
|
||||
Reference in New Issue
Block a user