For our project we updated the library to version 6 and currently we can see css classes seem to be generated, as I think styled components are used under the hood.
Previously we could directly target nodes, links, ports, and apply styles using SCSS.
@alexandrudanpop
you can create your own components having basically any style you want.
Check the custom node demo:
http://projectstorm.cloud/react-diagrams/?path=/story/custom-models--custom-diamond-node
Ok, that's cool, but I would like to know how I can customize the existig ones as for my current scenario they are enough they just need some simple style tweeks: padding, margin, border, shadow, etc.
Would like something like: new DefaultNodeModel({ className: "myCustomNode" }).
Or have default class names for the out of the box library components so I can style them. Think having to write custom code for this would be overkill.
My suggestions could also lower the barrier to entry for other people that could potentially use this library.
Ok, that's cool, but I would like to know how I can customize the existig ones as for my current scenario they are enough they just need some simple style tweeks: padding, margin, border, shadow, etc.
Would like something like: new DefaultNodeModel({ className: "myCustomNode" }).
Or have default class names for the out of the box library components so I can style them. Think having to write custom code for this would be overkill.
My suggestions could also lower the barrier to entry for other people that could potentially use this library.
the demo gallery contains everything you need including the basic CSS used to display the nodes
Thanks for your answer @antonioru. I will definitely check the demos in more detail.
Still we could have some docs for this library specifically for how styling should be done.
If anyone with more knowledge can address this and add a PR it would be great.
@alexandrudanpop
I understand, I'll try to open a PR for it as soon as I have some time, thank you :)
Most helpful comment
@alexandrudanpop
I understand, I'll try to open a PR for it as soon as I have some time, thank you :)