Skip to content

Commit

Permalink
feat(dev server): add example of name as jsx element
Browse files Browse the repository at this point in the history
  • Loading branch information
snoh666 committed Aug 21, 2023
1 parent ebd8aed commit 84ada17
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dev-server/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ ReactDom.render(
groupArraysAfterLength={50}
src={getExampleJson4()}
/>

{/* Name as colored react component */}
<JsonViewer
collapsed
name={<span style={{color: "red", fontWeight: 800}}>React Element as name</span>}
src={getExampleJson2()}
/>
</div>,
document.getElementById('app-container')
);
Expand Down

0 comments on commit 84ada17

Please sign in to comment.