Nonstop Progressive Marxism

    vdom-file-upload

    0.0.4 • Public • Published

    vdom file upload

    File upload UI component for virtual dom rendering engine.

    demo

    install

    $ npm install vdom-file-upload
    

    example

    var vdom = require('virtual-dom');
    var FileUpload = require('vdom-file-upload');
     
    // return `observ-struct` instance
    var state = FileUpload({
      label: 'example',
      onChange: function(files) {
        console.log('change', files);
      }
    });
     
    var loop = require('main-loop')(
      state(),
      // pass in a hyperscript function
      FileUpload.render.bind(null, vdom.h),
      vdom
    );
     
    state(loop.update);
    document.getElementById('content').appendChild(loop.target);

    Install

    npm i vdom-file-upload

    DownloadsWeekly Downloads

    1

    Version

    0.0.4

    License

    ISC

    Last publish

    Collaborators

    • nichoth