Skip to content

Commit

Permalink
fix(@types): improve the NodeRenderProps type
Browse files Browse the repository at this point in the history
  • Loading branch information
kei711 committed Apr 16, 2021
1 parent 518158c commit 57dbbff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions @types/DiagramSchema.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ElementType, ReactElement, ReactNode } from 'react';
import { ElementType, HTMLAttributes, ReactElement, ReactNode } from 'react';

export type PortAlignment = 'right' | 'left' | 'top' | 'bottom';

Expand Down Expand Up @@ -26,7 +26,10 @@ export type Node<P> = {
export type NodeRenderProps<P> = Omit<
Node<P>,
'coordinates' | 'disableDrag' | 'inputs' | 'outputs'
> & { inputs: ReactElement<Port>[]; outputs: ReactElement<Port>[] };
> & {
inputs: ReactElement<Port & HTMLAttributes<HTMLDivElement>>[];
outputs: ReactElement<Port & HTMLAttributes<HTMLDivElement>>[];
};

export type Link = {
input: string;
Expand Down

0 comments on commit 57dbbff

Please sign in to comment.