Skip to content

Commit

Permalink
🐛 feat: add nodeProps type export
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangchu committed Jan 16, 2024
1 parent 84ed8a7 commit 0dff4f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions docs/caseShow/demos/pipelineDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import {
FlowView,
FlowViewProvider,
Handle,
NodeProps,
Position,
SelectType,
useFlowViewer,
} from '@ant-design/pro-flow';
import { FC, useCallback } from 'react';
import { SelectType } from '../../../src';
import useStyles from './index.style';

interface PipeNodeChild {
Expand All @@ -32,9 +33,7 @@ interface PipeNode {
const nodeWidth = 170;
const nodeHeight = 500;

export const PipeNode: FC<{
data: PipeNode;
}> = ({ data }) => {
export const PipeNode: FC<NodeProps<PipeNode>> = ({ data }) => {
const { stepTitle, title, des, logo, needSwitch = false, children = [], selectType } = data;
const { styles } = useStyles();

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ export * from './Input';
export * from './MiniMap';
export * from './constants';

export type { Connection, EdgeChange, EdgeProps, NodeChange } from 'reactflow';
export type { Connection, EdgeChange, EdgeProps, NodeChange, NodeProps } from 'reactflow';
export type { FlowEditorStoreProviderProps } from './FlowStoreProvider';
export type { ExtraAction } from './NodeField';

0 comments on commit 0dff4f4

Please sign in to comment.