Skip to content

Commit

Permalink
docs: add documentation for ControlButton
Browse files Browse the repository at this point in the history
  • Loading branch information
bcakmakoglu committed Jun 15, 2022
1 parent 3162b79 commit 33cd638
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
19 changes: 17 additions & 2 deletions docs/src/.vuepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,25 @@ export default {
'/guide/node',
'/guide/edge',
'/guide/composables',
{ text: 'Utilities', children: ['/guide/utils/graph', '/guide/utils/instance', '/guide/utils/edge'] },
{
text: 'Utilities',
children: [
'/guide/utils/graph',
'/guide/utils/instance',
'/guide/utils/edge'
]
},
{
text: 'Additional Components',
children: ['/guide/components/background', '/guide/components/minimap', '/guide/components/controls'],
children: [
'/guide/components/background',
'/guide/components/minimap',
{
text: 'Controls',
link: '/guide/components/controls',
children: ['/guide/components/control-button']
},
],
},
],
},
Expand Down
26 changes: 26 additions & 0 deletions docs/src/guide/components/control-button.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Control Button

You can use the existing `ControlButton` component to create new control buttons.

## Usage

To use the component pass the `ControlButton` component as a child to the [`Controls`](/guide/components/control-button.html/) component.

```vue
<template>
<VueFlow>
<Controls>
<ControlButton>
<i class="fa fa-plus"></i>
</ControlButton>
</Controls>
</VueFlow>
</template>
```

## Slots

| Name | Definition |
|---------|------------------------------------------------------|
| default | inner slot of btn (is wrapped by a `<button>` element) |

0 comments on commit 33cd638

Please sign in to comment.