docs: add documentation for ControlButton
This commit is contained in:
@@ -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']
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -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) |
|
||||
|
||||
Reference in New Issue
Block a user