Skip to content
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

Is it possible to add/edit label on links? #16

Closed
victoriaHan opened this issue Apr 30, 2019 · 2 comments
Closed

Is it possible to add/edit label on links? #16

victoriaHan opened this issue Apr 30, 2019 · 2 comments

Comments

@victoriaHan
Copy link

Hi,
I have some questions.
Is it possible to add/edit label on links?
is it possible to rename the node(box)
does it work it on IE11?

This library looks good so I am considering to use it, however those above functions are needed to me. So could you please answer about it? Thank you

@alexkuz
Copy link
Contributor

alexkuz commented May 1, 2019

It doesn't have labels as far as I know, but you can easily implement it yourself, something like this:

import { FlowChart, LinkDefault } from 'react-flow-chart';


<FlowChart
  Components={{
    Link: (props) => <><LinkDefault {...props} /><MyLinkLabel {...props} /></>
  }}
  ...
/>

See LinkDefault.tsx for a reference.

You can also customize Node in a same way.

@MrBlenny MrBlenny closed this as completed May 9, 2019
@MrBlenny
Copy link
Owner

Storybook example:
Demo
Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants