react-json-view
react-json-view copied to clipboard
[Feature] Color fields
This PR adds a support for color fields
here is an example https://react-theming.github.io/storybook-addon
i noticed an issue with collapsed strings:

color strings get collapsed but expanding them doesn't work.
you can see this in the first example on your branch if you npm run dev.
should we just ignore the collapsed string length for colors?
I love this idea, thanks again for posting
i think there are a couple of things that should happen before this gets merged and published:
- add at least one test to make sure the color box is rendering (or not rendering) when appropriate
- i think there should be a prop that enables/disables this functionality. if the prop is disabled, we just treat colors as strings. I could see this feature being unexpected (possibly undesirable) for people using rjv to interact with their data. I'm definitely open to discussion on this.
- last of all, include a bump to the minor version in package.json.
- (optionally) update the demo src to include a color. this is a cool feature that would be fun to show off. then run npm run build:demo and add the updated demo build to the pr. I can merge into the gh-pages branch if you decide to do this.