Skip to content

Commit

Permalink
feat: update the docs demo
Browse files Browse the repository at this point in the history
  • Loading branch information
stone-lyl committed Feb 6, 2025
1 parent 65069eb commit e794c9d
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/docs/components/demos/ObserversDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const ObserversDemo = () => {
setPoints([]);
run();
}}
hideControls={['save']}
hideControls={['save', 'import']}
client={client}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/components/demos/TinkerDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default () => {
<div className="w-full h-1/2">
<DataStory
client={client}
hideControls={['save']}
hideControls={['save', 'import']}
/>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/components/demos/Tree/AddNodeDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default () => {
<DataStory
client={client}
hideActivityBar={true}
hideControls={['save']}
hideControls={['save', 'import']}
/>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/components/demos/Tree/MultipleDiagram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default () => {
<div className="w-full h-80 border-gray-400 border-4">
<DataStory
client={client}
hideControls={['save']}
hideControls={['save', 'import']}
/>
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/components/demos/UnfoldingDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@ export default ({ part }: { part: 'MAIN' | 'NESTED_NODE' | 'MAIN_UNFOLDED' }) =>
<div className="w-full h-1/4">
{part === 'MAIN' && (
<DataStory
hideControls={['save']}
hideControls={['save', 'import']}
onInitialize={({ run }) => run()}
client={clients.mainClient}
/>
)}
{part === 'NESTED_NODE' && (
<DataStory hideControls={['save']} client={clients.nestedNodeClient!} />
<DataStory hideControls={['save', 'import']} client={clients.nestedNodeClient!} />
)}
{part === 'MAIN_UNFOLDED' && (
<DataStory hideControls={['save']} client={clients.mainUnfoldedClient!} />
<DataStory hideControls={['save', 'import']} client={clients.mainUnfoldedClient!} />
)}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/components/demos/VisualizeDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default () => {
setPoints([])
run()
}}
hideControls={['save']}
hideControls={['save', 'import']}
client={client}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/ds-ext/src/app/DiagramApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function DiagramApp() {
key={'abc'}
onChange={handleChange}
onDrop={onDrop}
hideControls={['save']}
hideControls={['save', 'import']}
/>
<VsCodeToast postMessage={window.vscode.postMessage} />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function DataStoryControls({
<ExportIcon />
</ControlButton>,
<ControlButton
title="import"
title="Import"
aria-label="import"
key="import"
onClick={handleImport}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/DataStory/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface ClientRunParams {
}

export type AcitvityBarType = 'node' | 'diagram' | 'settings' | 'explorer';
type ControlsType = 'run' | 'addNode' | 'save';
type ControlsType = 'run' | 'addNode' | 'save' | 'export' | 'import';
export type DataStoryProps = {
onNodeDoubleClick?: (node: ReactFlowNode) => void,
children?: React.ReactNode;
Expand Down

0 comments on commit e794c9d

Please sign in to comment.