-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(@types): improve types of DiagramNode #91
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Keisuke Kan <[email protected]>
@types/DiagramSchema.ts
Outdated
export type NodeRenderProps<P> = Omit< | ||
Node<P>, | ||
'coordinates' | 'disableDrag' | 'inputs' | 'outputs' | ||
> & { inputs: ReactElement<Port>[]; outputs: ReactElement<Port>[] }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
@antonioru thank you review!
any updates on this? |
All works if we change it to export type NodeRenderProps<P> = Omit<
Node<P>,
'coordinates' | 'disableDrag' | 'inputs' | 'outputs'
> & {
inputs: ReactElement<Port & HTMLAttributes<HTMLDivElement>>[];
outputs: ReactElement<Port & HTMLAttributes<HTMLDivElement>>[]
}; |
export type NodeRenderProps<P> = Omit< | ||
Node<P>, | ||
'coordinates' | 'disableDrag' | 'inputs' | 'outputs' | ||
> & { | ||
inputs: ReactElement<Port & HTMLAttributes<HTMLDivElement>>[]; | ||
outputs: ReactElement<Port & HTMLAttributes<HTMLDivElement>>[]; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refs:
https://github.com/beautifulinteractions/beautiful-react-diagrams/blob/c18805eb503b810ec8ec53fc3923d8d6d1ae0d7e/src/Diagram/DiagramNode/DiagramNode.js#L59
https://github.com/beautifulinteractions/beautiful-react-diagrams/blob/c18805eb503b810ec8ec53fc3923d8d6d1ae0d7e/src/Diagram/Port/Port.js#L48
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):