Skip to content

Commit d86d6f0

Browse files
committed
chore(docs,examples): cleanup
Signed-off-by: braks <[email protected]>
1 parent dda78c1 commit d86d6f0

File tree

11 files changed

+15
-20
lines changed

11 files changed

+15
-20
lines changed

docs/components/home/flows/Additional.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ onPaneReady((i) => emit('pane', i))
9898
<VueFlow>
9999
<Controls :show-interactive="false" />
100100
<MiniMap mask-color="rgba(16, 185, 129, 0.5)" class="transform scale-60 origin-bottom-right opacity-75" />
101-
<Background variant="lines" pattern-color="#aaa" :gap="46" />
101+
<Background variant="lines" color="#aaa" :gap="46" />
102102
</VueFlow>
103103
</div>
104104

docs/components/home/flows/Intro.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ function scrollTo() {
190190

191191
<template>
192192
<VueFlow ref="el" :style="{ opacity: !!currentBreakpoint ? 1 : 0 }">
193-
<Background id="dots" pattern-color="#aaa" :size="0.75" :gap="25" />
194-
<Background id="lines" variant="lines" :pattern-color="isDark ? '#fff' : '#000'" :size="1" :gap="100" />
193+
<Background id="dots" color="#aaa" :size="0.75" :gap="25" />
194+
<Background id="lines" variant="lines" :color="isDark ? '#fff' : '#000'" :size="1" :gap="100" />
195195

196196
<template #node-box="props">
197197
<template v-if="props.id === 'intro'">

docs/components/home/flows/Nested.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ onPaneReady((i) => emit('pane', i))
7676
>
7777
<VueFlow class="nested">
7878
<Controls class="md:(!left-auto !right-[10px])" />
79-
<Background pattern-color="#aaa" class="!bg-gray-800" :gap="18" />
79+
<Background color="#aaa" class="!bg-gray-800" :gap="18" />
8080
</VueFlow>
8181
</div>
8282
</template>

docs/components/home/flows/RGB.vue

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts" setup>
22
import { VueFlow, useVueFlow } from '@vue-flow/core'
33
import { breakpointsTailwind } from '@vueuse/core'
4-
import { Background, BackgroundVariant } from '@vue-flow/background'
4+
import { Background } from '@vue-flow/background'
55
import { Controls } from '@vue-flow/controls'
66
import { MiniMap } from '@vue-flow/minimap'
77
import type { MiniMapNodeFunc } from '@vue-flow/minimap'
@@ -96,12 +96,7 @@ const nodeColor: MiniMapNodeFunc = (node) => {
9696
</template>
9797
<Controls class="hidden md:block" />
9898

99-
<Background
100-
:variant="BackgroundVariant.Lines"
101-
:pattern-color="`rgb(${color.red}, ${color.green}, ${color.blue})`"
102-
:gap="48"
103-
:size="1"
104-
/>
99+
<Background variant="lines" :color="`rgb(${color.red}, ${color.green}, ${color.blue})`" :gap="48" :size="1" />
105100

106101
<MiniMap class="hidden sm:block transform scale-25 md:scale-50 lg:scale-75 origin-bottom-right" :node-color="nodeColor" />
107102
</VueFlow>

docs/examples/basic/App.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function toggleDarkMode() {
102102
:min-zoom="0.2"
103103
:max-zoom="4"
104104
>
105-
<Background pattern-color="#aaa" :gap="16" />
105+
<Background color="#aaa" :gap="16" />
106106

107107
<MiniMap />
108108

docs/examples/dnd/DropzoneBackground.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Background } from '@vue-flow/background'
44

55
<template>
66
<div class="dropzone-background">
7-
<Background :size="2" :gap="20" pattern-color="#BDBDBD" />
7+
<Background :size="2" :gap="20" color="#BDBDBD" />
88

99
<div class="overlay">
1010
<slot />

examples/nuxt3/components/Flow.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function toggleDarkMode() {
9999
:min-zoom="0.2"
100100
:max-zoom="4"
101101
>
102-
<Background pattern-color="#aaa" :gap="16" />
102+
<Background :gap="16" />
103103

104104
<MiniMap />
105105

examples/vite/src/EasyConnect/EasyConnect.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ onConnect(addEdges)
5757
:min-zoom="0.2"
5858
:max-zoom="4"
5959
>
60-
<Background pattern-color="#aaa" :gap="8" />
60+
<Background :gap="8" />
6161

6262
<MiniMap />
6363

examples/vite/src/Empty/EmptyExample.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts" setup>
22
import { VueFlow, useVueFlow } from '@vue-flow/core'
33
4-
import { Background, BackgroundVariant } from '@vue-flow/background'
4+
import { Background } from '@vue-flow/background'
55
import { Controls } from '@vue-flow/controls'
66
import { MiniMap } from '@vue-flow/minimap'
77
@@ -28,7 +28,7 @@ function addRandomNode() {
2828
<VueFlow>
2929
<MiniMap />
3030
<Controls />
31-
<Background :variant="BackgroundVariant.Lines" />
31+
<Background variant="lines" />
3232

3333
<button type="button" :style="{ position: 'absolute', left: '10px', top: '10px', zIndex: 4 }" @click="addRandomNode">
3434
add node

examples/vite/src/FloatingEdges/FloatingEdges.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts" setup>
22
import { MarkerType, VueFlow, useVueFlow } from '@vue-flow/core'
3-
import { Background, BackgroundVariant } from '@vue-flow/background'
3+
import { Background } from '@vue-flow/background'
44
import { Controls } from '@vue-flow/controls'
55
import { MiniMap } from '@vue-flow/minimap'
66
@@ -18,7 +18,7 @@ onConnect((params) => addEdges({ ...params, type: 'floating', markerEnd: MarkerT
1818
<template>
1919
<div class="floatingedges">
2020
<VueFlow fit-view-on-init>
21-
<Background :variant="BackgroundVariant.Lines" :gap="24" />
21+
<Background variant="lines" :gap="24" />
2222

2323
<MiniMap />
2424

examples/vite/src/Overview/Overview.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,6 @@ const elements = ref<Elements>(initialElements)
174174
>
175175
<MiniMap :node-stroke-color="nodeStrokeColor" :node-color="nodeColor" :node-border-radius="2" />
176176
<Controls />
177-
<Background color="#aaa" :gap="20" />
177+
<Background variant="lines" />
178178
</VueFlow>
179179
</template>

0 commit comments

Comments
 (0)