(props: {
value: TData
copyable?: boolean
defaultExpansionDepth?: number
collapsePaths?: Array<TName>
config?: { dateFormat?: string }
})
| 12 | // utils |
| 13 | import type { CollapsiblePaths } from '../utils/deep-keys' |
| 14 | |
| 15 | export function JsonTree<TData, TName extends CollapsiblePaths<TData>>(props: { |
| 16 | value: TData |
| 17 | copyable?: boolean |
| 18 | |
| 19 | defaultExpansionDepth?: number |
| 20 | collapsePaths?: Array<TName> |
| 21 | |
| 22 | config?: { dateFormat?: string } |
| 23 | }) { |
| 24 | return ( |
| 25 | <JsonValue |
| 26 | isRoot |
| 27 | value={props.value} |
| 28 | copyable={props.copyable} |
| 29 | depth={0} |
| 30 | defaultExpansionDepth={props.defaultExpansionDepth ?? 1} |
| 31 | path="" |
| 32 | collapsePaths={props.collapsePaths} |
| 33 | config={props.config} |
| 34 | /> |
| 35 | ) |
| 36 | } |
| 37 | |
| 38 | function JsonValue(props: { |
nothing calls this directly
no outgoing calls
no test coverage detected