docs: update component documentation with new examples

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2022-12-14 13:46:08 +01:00
committed by Braks
parent f2eb883b26
commit 15ca63a59c
6 changed files with 49 additions and 7 deletions
+18 -1
View File
@@ -13,9 +13,26 @@ npm install @vue-flow/minimap
To use the minimap simply pass the `MiniMap` component as a child to the `VueFlow` component.
::: warning
Make sure you also import the styles as these are *not* part of the default theme anymore.
:::
```vue
<script setup>
import { VueFlow } from '@vue-flow/core'
import { MiniMap } from '@vue-flow/minimap'
// import default minimap styles
import '@vue-flow/minimap/dist/style.css'
import initialElements from './initial-elements'
// some nodes and edges
const elements = ref(initialElements)
</script>
<template>
<VueFlow>
<VueFlow v-model="elements" fit-view-on-init class="vue-flow-basic-example">
<MiniMap />
</VueFlow>
</template>