chore(docs): update example styles (#1469)

* chore(docs): update basic example styles

* chore(docs): update confirm delete example styles

* chore(docs): update dnd example styles

* chore(docs): update hidden example

* chore(docs): update update node example

* chore(docs): update node toolbar example styles

* chore(docs): update transition example styles

* chore(docs): cleanup basic example els

* chore(docs): cleanup examples
This commit is contained in:
Braks
2024-06-10 23:51:47 +02:00
committed by braks
parent 5dc8711a6b
commit d71de0a92d
34 changed files with 528 additions and 244 deletions
+18 -12
View File
@@ -1,23 +1,29 @@
<script setup>
import { Handle, Position } from '@vue-flow/core'
import { Handle, Position, useVueFlow } from '@vue-flow/core'
import { NodeToolbar } from '@vue-flow/node-toolbar'
defineProps(['data', 'label'])
const props = defineProps(['id', 'data'])
const actions = ['👎', '✋', '👍']
const { updateNodeData } = useVueFlow()
</script>
<template>
<NodeToolbar
style="display: flex; gap: 0.5rem; align-items: center"
:is-visible="data.toolbarVisible"
:position="data.toolbarPosition"
>
<button>Action1</button>
<button>Action2</button>
<button>Action3</button>
<NodeToolbar :is-visible="data.toolbarVisible" :position="data.toolbarPosition">
<button
v-for="action of actions"
:key="action"
type="button"
:class="{ selected: action === data.action }"
@click="updateNodeData(props.id, { action })"
>
{{ action }}
</button>
</NodeToolbar>
<div :style="{ padding: '10px 20px' }">
{{ label }}
<div>
{{ data.label }}
</div>
<Handle type="target" :position="Position.Left" />