From 241f62390f1cb38c323aeab5e19229238bb0f4f2 Mon Sep 17 00:00:00 2001 From: stone Date: Mon, 30 Sep 2024 18:02:52 +0800 Subject: [PATCH] feat: increase sidebar width and add default node --- packages/docs/components/Playground.tsx | 1 - packages/ui/src/components/DataStory/DataStory.tsx | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/docs/components/Playground.tsx b/packages/docs/components/Playground.tsx index d7b10848..8773dabc 100644 --- a/packages/docs/components/Playground.tsx +++ b/packages/docs/components/Playground.tsx @@ -20,7 +20,6 @@ function Playground({ mode }: {mode?: 'js' | 'node'}) {
diff --git a/packages/ui/src/components/DataStory/DataStory.tsx b/packages/ui/src/components/DataStory/DataStory.tsx index 8bd4a812..51509928 100644 --- a/packages/ui/src/components/DataStory/DataStory.tsx +++ b/packages/ui/src/components/DataStory/DataStory.tsx @@ -23,7 +23,7 @@ export const DataStoryComponent = ( const [selectedNode, setSelectedNode] = useState(); const [isSidebarClose, setIsSidebarClose] = useState(!!props.hideSidebar); const [updateSelectedNodeData, setUpdateSelectedNodeData] = useState(); - const [sidebarKey, setSidebarKey] = useState(initSidebarKey ?? ''); + const [sidebarKey, setSidebarKey] = useState(initSidebarKey ?? 'addNode'); const partialStoreRef = useRef>(null); const [diagram, setDiagram] = useState(initDiagram || new Diagram()); const [diagramKey, setDiagramKey] = useState(); @@ -85,7 +85,7 @@ export const DataStoryComponent = ( onChange={onChange} /> - +