RexSkz / json-diff-kit

A better JSON differ & viewer, support LCS diff for arrays and recognise some changes as "modification" apart from simple "remove"+"add".
https://json-diff-kit.js.org
MIT License
138 stars 12 forks source link

Possible configuration for changing the highlighter color in Viewer #19

Closed mdislam closed 9 months ago

mdislam commented 1 year ago

Hi Is it possible to customise the highlighter color?

For example, If there is difference in values between 2 JSONs, then I would like to have "purple" highlighter instead of orange?

Regards, mesbahul

RexSkz commented 1 year ago

Definitely yes! There's a prop bgColour in the <Viewer> component. You can use it like this:

<Viewer
  bgColour={{
    // add: 'green',
    // remove: 'red',
    modify: 'purple',
  }}
/>

The result should be as expected:

image