Skip to content

Commit

Permalink
✨ feat: add reactflow css
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangchu committed Oct 18, 2023
1 parent c491ca9 commit 0710bb7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ProFlow/demos/ProFlowDemo.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NodeSelect, ProFlowNode } from '@/index';
import { createStyles } from 'antd-style';
import { memo } from 'react';
import ProFlow from '..';
import { NodeSelect, ProFlowNode } from '../constants';

const useStyles = createStyles(({ css }) => ({
container: css`
Expand Down
2 changes: 2 additions & 0 deletions src/ProFlow/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useCallback, useMemo, type MouseEvent as ReactMouseEvent } from 'react';
import ReactFlow, { Background, BackgroundVariant, Edge, Node } from 'reactflow';
import 'reactflow/dist/style.css';
import { ProFlowController, ProFlowProps, RadiusEdge } from '../index';
import { convertMappingFrom, getRenderData } from './helper';
import { useStyles } from './styles';
Expand Down Expand Up @@ -66,6 +67,7 @@ const ProFlow: React.FC<Partial<ProFlowProps>> = (props) => {
[onNodeClick],
);

// TODO: 要把loading状态包掉,要把空状态包掉。
return (
<ReactFlow
className={cx(styles.container)}
Expand Down
1 change: 1 addition & 0 deletions src/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export interface ProFlowEdge {
target: string;
type?: EdgeType;
}

export interface ProFlowNodeData {
title: string;
describe: string;
Expand Down

0 comments on commit 0710bb7

Please sign in to comment.