react-json-view icon indicating copy to clipboard operation
react-json-view copied to clipboard

Custom Buttons

Open chad-autry opened this issue 4 years ago • 4 comments

I would like a feature to allow for custom buttons + callbacks. In fact I've developed the bulk of the feature, but don't have the personal time to polish it sufficiently for a pull request.

https://github.com/mac-s-g/react-json-view/compare/master...chad-autry:master

Issues with my current changes:

  1. Did not fix/add tests. Disabled tests
  2. Does not show only on-hover like other buttons (and in fact I disabled that for the CopyButton on the branch due to my own desires)
  3. dev-server examples could use distinct icons
  4. Styling re-uses from CopyButton, no distinct default style/color. No way to pass in style parameters or button color
  5. README.md needs to document the new parameter

chad-autry avatar Apr 24 '21 15:04 chad-autry

I'm glad I found this issue. I think Custom Buttons support is required and I'll definitely use this feature.

If you need a hand let me know...

idonava avatar May 07 '21 18:05 idonava

@chad-autry This is awesome. I'll have to try your fork! Do you have a quick example of how to make a custom button?

tslater avatar Jun 06 '21 04:06 tslater

@chad-autry awesome work! Do you plan to submit a PR?

ihor avatar Jun 17 '21 09:06 ihor

I am unlikely to find the time to make a PR myself, the five issues noted in the original comment need to be taken care of before it could be merged.

chad-autry avatar Jun 18 '21 14:06 chad-autry