Skip to content

Commit ebd8aed

Browse files
committed
feat(types): add JSX.Element as name prop type
1 parent dbcd203 commit ebd8aed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Or add to your package.json config file:
4141
Name|Type|Default|Description
4242
|:---|:---|:---|:---
4343
`src`|`JSON Object`|None|This property contains your input JSON
44-
`name`|`string` or `false`|"root"|Contains the name of your root node. Use `null` or `false` for no name.
44+
`name`|`string`|`JSX.Element` or `false`|"root"|Contains the name of your root node. Use `null` or `false` for no name.
4545
`theme`|`string`|"rjv-default"|RJV supports base-16 themes. Check out the list of supported themes [in the demo](https://mac-s-g.github.io/react-json-view/demo/dist/). A custom "rjv-default" theme applies by default.
4646
`style`|`object`|`{}`|Style attributes for react-json-view container. Explicit style attributes will override attributes provided by a theme.
4747
`iconStyle`|`string`|"circle"| Style of expand/collapse icons. Accepted values are "circle", triangle" or "square".

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface ReactJsonViewProps {
1212
*
1313
* Default: "root"
1414
*/
15-
name?: string | null | false;
15+
name?: React.JSX.Element | string | null | false;
1616
/**
1717
* RJV supports base-16 themes. Check out the list of supported themes in the demo.
1818
* A custom "rjv-default" theme applies by default.

0 commit comments

Comments
 (0)