DefinitelyTyped/types/react-json-pretty/react-json-pretty-tests.tsx
2017-06-21 09:48:37 +02:00

18 lines
378 B
TypeScript

import * as React from "react";
import * as JSONPretty from "react-json-pretty";
export class Test extends React.Component {
render() {
const json = {
foo: "bar"
};
return (
<div>
<JSONPretty json={ json } />
<JSONPretty json={ JSON.stringify(json) } />
</div>
);
}
}