From 36527910f31b94c80e39b3521538ae7e46a8079e Mon Sep 17 00:00:00 2001
From: mathuo <6710312+mathuo@users.noreply.github.com>
Date: Thu, 25 Apr 2024 22:14:39 +0100
Subject: [PATCH] chore: docs
---
.../react/dockview/demo-dockview/src/app.tsx | 24 ++-
.../demo-dockview/src/defaultLayout.ts | 4 +-
.../demo-dockview/src/gridActions.tsx | 11 +-
.../demo-dockview/src/groupActions.tsx | 199 +++++++++++-------
.../demo-dockview/src/panelActions.tsx | 125 +++++------
5 files changed, 214 insertions(+), 149 deletions(-)
diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx
index 4db4c8aeb..c657af112 100644
--- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx
+++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx
@@ -188,16 +188,20 @@ const DockviewDemo = (props: { theme?: string }) => {
>
-
-
+ {api && (
+
+ )}
+ {api && (
+
+ )}
{
let counter = 0;
- return () => {
- counter++;
- };
+ return () => counter++;
})();
export function defaultConfig(api: DockviewApi) {
diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/gridActions.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/gridActions.tsx
index 667e789ee..11466bc12 100644
--- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/gridActions.tsx
+++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/gridActions.tsx
@@ -34,11 +34,12 @@ export const GridActions = (props: { api?: DockviewApi }) => {
}
};
- const onAddPanel = () => {
+ const onAddPanel = (options?: { inactive: boolean }) => {
props.api?.addPanel({
id: `id_${Date.now().toString()}`,
component: 'default',
title: `Tab ${nextId()}`,
+ inactive: options?.inactive,
});
};
@@ -48,9 +49,15 @@ export const GridActions = (props: { api?: DockviewApi }) => {
return (
-