From 2d7ca6d4d6b720ed0837e196c64beb590b12d73c Mon Sep 17 00:00:00 2001 From: jiangchu Date: Tue, 14 Nov 2023 11:10:34 +0800 Subject: [PATCH] :memo: feat: demos path --- src/Background/demos/index.tsx | 21 +++++++------------ src/FlowPanel/demos/index.tsx | 3 +-- src/LineageGroupNode/demos/index.tsx | 3 +-- src/LineageNode/demos/index.tsx | 3 +-- .../demos/FlowControllerDemo.tsx | 18 ++++++++++++++-- src/index.ts | 1 + 6 files changed, 27 insertions(+), 22 deletions(-) diff --git a/src/Background/demos/index.tsx b/src/Background/demos/index.tsx index 32f2cde..acbfd77 100644 --- a/src/Background/demos/index.tsx +++ b/src/Background/demos/index.tsx @@ -1,8 +1,7 @@ -import { FlowView } from '@/index'; +import { Background, BackgroundVariant, FlowPanel, FlowView } from '@ant-design/pro-flow'; +import { Button } from 'antd'; import { createStyles } from 'antd-style'; import { memo, useState } from 'react'; -import { Panel } from 'reactflow'; -import Background, { BackgroundVariant } from '..'; const useStyles = createStyles(({ css }) => ({ container: css` @@ -18,18 +17,12 @@ const BackgroundDemo = memo(() => { return (
- +
variant:
- - - -
+ + + +
diff --git a/src/FlowPanel/demos/index.tsx b/src/FlowPanel/demos/index.tsx index e626fb9..f5e5254 100644 --- a/src/FlowPanel/demos/index.tsx +++ b/src/FlowPanel/demos/index.tsx @@ -1,7 +1,6 @@ -import { FlowView } from '@/index'; +import { FlowPanel, FlowView } from '@ant-design/pro-flow'; import { createStyles } from 'antd-style'; import { memo } from 'react'; -import FlowPanel from '..'; const useStyles = createStyles(({ css }) => ({ container: css` diff --git a/src/LineageGroupNode/demos/index.tsx b/src/LineageGroupNode/demos/index.tsx index a6cab64..916c979 100644 --- a/src/LineageGroupNode/demos/index.tsx +++ b/src/LineageGroupNode/demos/index.tsx @@ -1,5 +1,4 @@ -import { FlowViewEdge, FlowViewNode, SelectType } from '@/index'; -import { FlowView } from '@ant-design/pro-flow'; +import { FlowView, FlowViewEdge, FlowViewNode, SelectType } from '@/index'; import { createStyles } from 'antd-style'; import { useState } from 'react'; diff --git a/src/LineageNode/demos/index.tsx b/src/LineageNode/demos/index.tsx index ebd4f81..b4eb77e 100644 --- a/src/LineageNode/demos/index.tsx +++ b/src/LineageNode/demos/index.tsx @@ -1,5 +1,4 @@ -import { FlowViewEdge, FlowViewNode, SelectType } from '@/index'; -import { FlowView } from '@ant-design/pro-flow'; +import { FlowView, FlowViewEdge, FlowViewNode, SelectType } from '@ant-design/pro-flow'; import { Progress } from 'antd'; import { createStyles } from 'antd-style'; import React, { useState } from 'react'; diff --git a/src/ProFlowController/demos/FlowControllerDemo.tsx b/src/ProFlowController/demos/FlowControllerDemo.tsx index 1f671c0..de7fc2a 100644 --- a/src/ProFlowController/demos/FlowControllerDemo.tsx +++ b/src/ProFlowController/demos/FlowControllerDemo.tsx @@ -1,4 +1,4 @@ -import { FlowView, ProFlowController } from '@/index'; +import { FlowView, ProFlowController } from '@ant-design/pro-flow'; import { createStyles } from 'antd-style'; import { memo } from 'react'; @@ -13,7 +13,21 @@ const FlowControllerDemo = memo(() => { const { styles } = useStyles(); return (
- +
diff --git a/src/index.ts b/src/index.ts index 5b6b45a..b13b27f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ export * from './Background'; +export { default as Background } from './Background'; export { default as BasicNode } from './BasicNode'; export { default as CanvasLoading } from './CanvasLoading'; export * from './ControlInput';