-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat: accept any path
element attribute as a prop
#4855
Conversation
🦋 Changeset detectedLatest commit: 944238b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@mhuggins Thanks for the initial PR! I saw that we can simplify a couple of things here and there. I tried passing I don't understand why even this is throwing a Typescript error: const x : React.HTMLAttributes<SVGPathElement> = { pathLength: 5 }; Do you have any idea? |
@peterkogo I fixed this by changing I also added an example that demonstrates the |
Thanks for your help @mhuggins! I like the idea to pass svg attrs to the |
I removed quite a lot of manual prop drilling from some of the components. Some, like the straight edge, were using In reverse this means we have to prop drill for all components manually. Either way is fine for me. |
The prop drilling was introduced with this PR I think. Current main: https://github.com/xyflow/xyflow/blob/main/packages/react/src/components/Edges/StraightEdge.tsx |
You're right! I must have mistaken the StepEdge for a regular Edge. Will revert it. |
@moklick done, it's better this way. |
Thanks for helping see this through, everyone! 😄 |
This is an attempt to implement a solution for #4821.
Unfortunately, I could not seem to get my development environment set up following the contributing instructions. After running
pnpm install
, I was still seeing lint/typecheck errors before even beginning to make changes.