DefinitelyTyped/react-json-pretty/react-json-pretty-tests.tsx
2017-02-23 07:15:16 -08:00

18 lines
388 B
TypeScript

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