Skip to content

nykula/mithril-json-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published