@meetelise/searchable-react-json-view

1.0.0 • Public • Published

searchable-react-json-view

This is a fork of searchable-react-json-view.

The only changes made to the original package are:

  • The addition of react@^17 as an accepted peer dependency
  • Upgrading the lockfile from v1 to v3

Install

yarn add searchable-react-json-view

New Props

Name Type Default Description
highlightSearch string None What term to highlight - applies to number, string, boolean and object keys.
highlightSearchColor string Highlight color
highlightCurrentSearchColor string Current highlight color
customCopiedIcon JSX.Element null Custom icon that appears after copying
customCopyIcon JSX.Element null Custom icon for copy to clipboard
customActions array [] Custom actions that appear after copy, edit etc. each item should be: { icon: JSX.Element, onClick: clickedJsonValue => void }

Example

Custom actions & copy icon

<JsonViewer
    customCopiedIcon={<span>Copied</span>}
    customCopyIcon={<span>Copy</span>}
    customActions={[{
        icon: <span>A</span>,
        onClick: (value) => alert(JSON.stringify(value))
    }]}
/>

Package Sidebar

Install

npm i @meetelise/searchable-react-json-view

Weekly Downloads

32

Version

1.0.0

License

MIT

Unpacked Size

171 kB

Total Files

6

Last publish

Collaborators

  • lbach-elise
  • rsp48
  • noterol
  • jordieburton3
  • zgmeetelise
  • robcarlan_meetelise