【文件属性】:
文件名称:json-schema-viewer:JSON模式查看器React组件
文件大小:373KB
文件格式:ZIP
更新时间:2021-02-03 13:48:22
react json-schema storybook json-schema-viewer stoplightio
@ stoplight / json-schema-viewer
JSON模式查看器React组件
探索组件:
查看更改日志:
产品特点
全面的JSON Schema Draft 4支持,包括oneOf和anyOf组合器属性
将复杂的嵌套对象渲染到任何深度
渲染验证属性和降价描述
能够链接已解决的$ refs
可主题化
可折叠
安装
在现代浏览器和节点中受支持。
# latest stable
yarn add @stoplight/json-schema-viewer
用法
// index.jsx
import { JsonSchemaViewer } from " @stoplight/json-schema-viewer " ;
< JsonSchemaViewer
name = " Todos Model "
schema = { schema }
expanded = { true }
hideTopBar = { false }
emptyText = " No schema defined "
defaultExpandedDepth =
【文件预览】:
json-schema-viewer-master
----.gitignore(398B)
----package.json(3KB)
----tslint.json(45B)
----src()
--------components()
--------__stories__()
--------__tests__()
--------utils()
--------errors.ts(98B)
--------__fixtures__()
--------tree()
--------index.ts(190B)
--------hooks()
--------types.ts(2KB)
----jest.config.js(558B)
----LICENSE(11KB)
----__mocks__()
--------styleMock.js(21B)
--------react.ts(227B)
----tsconfig.json(250B)
----.github()
--------CODEOWNERS(33B)
----rollup.config.js(894B)
----README.md(2KB)
----setupTests.ts(154B)
----.storybook()
--------addons.js(45B)
--------webpack.config.js(268B)
--------config.js(88B)
--------preview-head.html(192B)
----tsconfig.build.json(446B)
----.circleci()
--------config.yml(604B)
----yarn.lock(646KB)