Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 467 Bytes

README.md

File metadata and controls

25 lines (20 loc) · 467 Bytes

mithril-json-tree

Mithril object viewer component.

var m = require('mithril');
var mjt = require('mithril-json-tree');

var data = {
  foo: 'bar',
};

m.mount(document.getElementById('app'), {
  view: function (ctrl) {
    return (
      m('div[style="white-space:nowrap"]', [
        m(mjt.MjtValue, { value: data }),
        m(mjt.MjtStyle),
      ])
    );
  },
});

See index.html and index.js for another example.