Skip to content

Commit

Permalink
chore(docs,examples): cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: braks <[email protected]>
  • Loading branch information
bcakmakoglu committed Jul 15, 2024
1 parent dda78c1 commit bf1b7e5
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/components/home/flows/Additional.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ onPaneReady((i) => emit('pane', i))
<VueFlow>
<Controls :show-interactive="false" />
<MiniMap mask-color="rgba(16, 185, 129, 0.5)" class="transform scale-60 origin-bottom-right opacity-75" />
<Background variant="lines" pattern-color="#aaa" :gap="46" />
<Background variant="lines" color="#aaa" :gap="46" />
</VueFlow>
</div>

Expand Down
4 changes: 2 additions & 2 deletions docs/components/home/flows/Intro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ function scrollTo() {

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

<template #node-box="props">
<template v-if="props.id === 'intro'">
Expand Down
2 changes: 1 addition & 1 deletion docs/components/home/flows/Nested.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ onPaneReady((i) => emit('pane', i))
>
<VueFlow class="nested">
<Controls class="md:(!left-auto !right-[10px])" />
<Background pattern-color="#aaa" class="!bg-gray-800" :gap="18" />
<Background color="#aaa" class="!bg-gray-800" :gap="18" />
</VueFlow>
</div>
</template>
Expand Down
9 changes: 2 additions & 7 deletions docs/components/home/flows/RGB.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { VueFlow, useVueFlow } from '@vue-flow/core'
import { breakpointsTailwind } from '@vueuse/core'
import { Background, BackgroundVariant } from '@vue-flow/background'
import { Background } from '@vue-flow/background'
import { Controls } from '@vue-flow/controls'
import { MiniMap } from '@vue-flow/minimap'
import type { MiniMapNodeFunc } from '@vue-flow/minimap'
Expand Down Expand Up @@ -96,12 +96,7 @@ const nodeColor: MiniMapNodeFunc = (node) => {
</template>
<Controls class="hidden md:block" />

<Background
:variant="BackgroundVariant.Lines"
:pattern-color="`rgb(${color.red}, ${color.green}, ${color.blue})`"
:gap="48"
:size="1"
/>
<Background variant="lines" :color="`rgb(${color.red}, ${color.green}, ${color.blue})`" :gap="48" :size="1" />

<MiniMap class="hidden sm:block transform scale-25 md:scale-50 lg:scale-75 origin-bottom-right" :node-color="nodeColor" />
</VueFlow>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/basic/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function toggleDarkMode() {
:min-zoom="0.2"
:max-zoom="4"
>
<Background pattern-color="#aaa" :gap="16" />
<Background color="#aaa" :gap="16" />

<MiniMap />

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/dnd/DropzoneBackground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Background } from '@vue-flow/background'

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

<div class="overlay">
<slot />
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guide/components/background.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { Background } from '@vue-flow/background'

| Name | Definition | Type | Optional | Default |
|--------------|---------------------------------------|--------------------------------------------------------|----------|---------|
| variant | Pattern variant | [BackgroundVariant](/typedocs/enums/BackgroundVariant) | true | dots |
| variant | Pattern variant | [BackgroundVariant](/typedocs/types/BackgroundVariant) | true | dots |
| gap | Pattern gap | number | true | 10 |
| size | Pattern size | number | true | 0.4 |
| patternColor | Pattern color | string | true | #81818a |
Expand Down
2 changes: 1 addition & 1 deletion examples/nuxt3/components/Flow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function toggleDarkMode() {
:min-zoom="0.2"
:max-zoom="4"
>
<Background pattern-color="#aaa" :gap="16" />
<Background :gap="16" />

<MiniMap />

Expand Down
2 changes: 1 addition & 1 deletion examples/vite/src/EasyConnect/EasyConnect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ onConnect(addEdges)
:min-zoom="0.2"
:max-zoom="4"
>
<Background pattern-color="#aaa" :gap="8" />
<Background :gap="8" />

<MiniMap />

Expand Down
4 changes: 2 additions & 2 deletions examples/vite/src/Empty/EmptyExample.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { VueFlow, useVueFlow } from '@vue-flow/core'
import { Background, BackgroundVariant } from '@vue-flow/background'
import { Background } from '@vue-flow/background'
import { Controls } from '@vue-flow/controls'
import { MiniMap } from '@vue-flow/minimap'
Expand All @@ -28,7 +28,7 @@ function addRandomNode() {
<VueFlow>
<MiniMap />
<Controls />
<Background :variant="BackgroundVariant.Lines" />
<Background variant="lines" />

<button type="button" :style="{ position: 'absolute', left: '10px', top: '10px', zIndex: 4 }" @click="addRandomNode">
add node
Expand Down
4 changes: 2 additions & 2 deletions examples/vite/src/FloatingEdges/FloatingEdges.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { MarkerType, VueFlow, useVueFlow } from '@vue-flow/core'
import { Background, BackgroundVariant } from '@vue-flow/background'
import { Background } from '@vue-flow/background'
import { Controls } from '@vue-flow/controls'
import { MiniMap } from '@vue-flow/minimap'
Expand All @@ -18,7 +18,7 @@ onConnect((params) => addEdges({ ...params, type: 'floating', markerEnd: MarkerT
<template>
<div class="floatingedges">
<VueFlow fit-view-on-init>
<Background :variant="BackgroundVariant.Lines" :gap="24" />
<Background variant="lines" :gap="24" />

<MiniMap />

Expand Down
2 changes: 1 addition & 1 deletion examples/vite/src/Overview/Overview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,6 @@ const elements = ref<Elements>(initialElements)
>
<MiniMap :node-stroke-color="nodeStrokeColor" :node-color="nodeColor" :node-border-radius="2" />
<Controls />
<Background color="#aaa" :gap="20" />
<Background variant="lines" />
</VueFlow>
</template>

0 comments on commit bf1b7e5

Please sign in to comment.