JSPM

  • Created
  • Published
  • Downloads 6431
  • Score
    100M100P100Q136366F
  • License BSD-3-Clause

VDOM Transform for jupyter outputs

Package Exports

  • @nteract/transform-vdom

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nteract/transform-vdom) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@nteract/transform-vdom

This package contains a React component for rendering virtual DOM elements returned by libraries like vdom for Python.

Installation

$ yarn add @nteract/transform-vdom
$ npm install --save @nteract/transform-vdom

Usage

The example below shows how we can use the component within this package to render a virtual DOM contain a div with some headers and an image.

import { TransformVDOM } from "@nteract/transform-vdom";

export default () => {
  return (
    <TransformVDOM
      data={{
        tagName: "div",
        attributes: { style: { color: "DeepPink" } },
        children: [
          { tagName: "h1", attributes: {}, children: "Wahoo" },
          { tagName: "h1", attributes: {}, children: null },
          {
            tagName: "img",
            attributes: { width: "100px", height: "100px", src: "about:blank" },
            children: []
          }
        ]
      }}
    />
  );
};

Documentation

We're working on adding more documentation for this component. Stay tuned by watching this repository!

Support

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 pkg:transform-vdom label.

License

BSD-3-Clause