Skip to content

Commit 01e1b32

Browse files
committed
chore(docs): update interaction example styles
1 parent ee8d30d commit 01e1b32

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

docs/examples/interaction/InteractionControls.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup>
2-
import { useVueFlow } from '@vue-flow/core'
2+
import { Panel, useVueFlow } from '@vue-flow/core'
33
import { ref } from 'vue'
44
55
const {
@@ -42,7 +42,7 @@ onMoveEnd((flowTransform) => console.log('move end', flowTransform))
4242
</script>
4343

4444
<template>
45-
<div class="controls">
45+
<Panel position="top-right">
4646
<div>
4747
<label class="label" for="draggable">
4848
nodesDraggable
@@ -113,5 +113,5 @@ onMoveEnd((flowTransform) => console.log('move end', flowTransform))
113113
<input id="capturezoompanescroll" v-model="captureZoomScroll" type="checkbox" class="vue-flow__capturezoompanescroll" />
114114
</label>
115115
</div>
116-
</div>
116+
</Panel>
117117
</template>

docs/examples/interaction/style.css

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
.interactionflow .controls {
2-
position: absolute;
3-
left: 0;
4-
top: 0;
5-
z-index: 4;
6-
font-size: 11px;
7-
background-color: lightgray;
8-
border-bottom-right-radius: 10px;
9-
padding: 8px;
1+
.vue-flow__panel {
2+
background-color: #2d3748;
3+
padding: 10px;
4+
border-radius: 8px;
5+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
6+
color: white;
7+
display: flex;
8+
flex-direction: column;
9+
gap: 2px;
10+
font-size: 12px;
11+
font-weight: 600;
1012
}
1113

12-
.interactionflow .controls .label {
14+
15+
.vue-flow__panel .label {
1316
display: flex;
1417
justify-content: space-between;
1518
align-items: center;
1619
gap: 5px;
1720
cursor: pointer;
1821
}
1922

20-
.interactionflow .controls .label input {
23+
.vue-flow__panel .label input {
2124
cursor: pointer;
2225
}

docs/examples/save-restore/style.css

+5
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@
2929
background-color: #2563eb;
3030
transition: background-color 0.2s;
3131
}
32+
33+
.vue-flow__panel button svg {
34+
width: 100%;
35+
height: 100%;
36+
}

0 commit comments

Comments
 (0)