This package contains a full set of transforms for rendering plain-text, rich media, and custom visualizations within nteract applications.
$ yarn add @nteract/transforms-full
$ npm install --save @nteract/transforms-full
The example below shows how to use the standard set of transforms to render plain text and image data.
;// Jupyter style MIME bundleconst bundle ="text/plain": "This is great""image/png": "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";// Find out which mimetype is the richestconst mimetype = ;// Get the matching React.Component for that mimetypelet Transform = transformsmimetype;// Create a React elementreturn <Transform data=bundlemimetype />;
The following example shows how you can extend the set of transforms with your own unique transforms. This allows you to create custom renders for different media types.
;let registry = transforms displayOrder ;registry = ;...const Transform = registrytransformsmimetype;
We're working on adding more documentation for this component. Stay tuned by watching this repository!
If you experience an issue while using this package or have a feature request, please file an issue on the issue board and add the