@nteract/transform-vdom
TypeScript icon, indicating that this package has built-in type declarations

4.0.15 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @nteract/transform-vdom

Weekly Downloads

8,025

Version

4.0.15

License

BSD-3-Clause

Unpacked Size

207 kB

Total Files

17

Last publish

Collaborators

  • hydrosquall
  • benabel
  • alexandercbooth
  • benrussert
  • mpacer
  • theengineear
  • yuvipanda
  • rgbkrk
  • lgeiger
  • ivanov
  • captainsafia
  • peggyrayzis
  • jdetle
  • hasch
  • willingc
  • stormpython
  • crystalline-cat
  • emeeks