chore: fix documentation

This commit is contained in:
mathuo 2024-08-05 21:17:39 +01:00
parent e5e9603221
commit af5ce5bbfd
No known key found for this signature in database
GPG Key ID: C6EEDEFD6CA07281

View File

@ -155,16 +155,24 @@ const panel = api.addPanel({
You should specific the `floating` option which can be either `true` or an object describing the position of the floating group. You should specific the `floating` option which can be either `true` or an object describing the position of the floating group.
:::info
The `position` property of the `floating` object accepts combinations of `top`, `left`, `bottom` and `right`.
:::
```ts ```ts
api.addPanel({ api.addPanel({
id: 'panel_1', id: 'panel_1',
component: 'default', component: 'default',
floating: true, floating: true
}); });
api.addPanel({ api.addPanel({
id: 'panel_2', id: 'panel_2',
component: 'default', component: 'default',
floating: { left: 10, top: 10, width: 300, height: 300 }, floating: {
position: { left: 10, top: 10 },
width: 300,
height: 300
}
}); });
``` ```