How to use marko-widgets - 10 common examples

To help you get started, we’ve selected a few marko-widgets examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marko-js / marko / test / components-pages / fixtures-deprecated / widget-fixed-id / components / app-fixed-id / index.js View on Github external
// Export a render(input, callback) method that can be used
// to render this UI component on the client or server
require("marko-widgets").renderable(exports, require("./renderer"));
github marko-js / marko / test / autotests / components-pages-deprecated / widget-fixed-id / components / app-fixed-id / index.js View on Github external
// Export a render(input, callback) method that can be used
// to render this UI component on the client or server
require('marko-widgets').renderable(exports, require('./renderer'));
github marko-js / marko / test / autotests-browser / widget-destroy-legacy / components / app-bar / index.js View on Github external
// Export a render(input, callback) method that can be used
// to render this UI component on the client or server
require('marko-widgets').renderable(exports, require('./renderer'));
github marko-js / marko / test / autotests-browser / widget-custom-events / components / app-bar / index.js View on Github external
// Export a render(input, callback) method that can be used
// to render this UI component on the client or server
require('marko-widgets').renderable(exports, require('./renderer'));
github marko-js / marko / test / autotests-browser / widget-config-template-data / index.js View on Github external
// Export a render(input, callback) method that can be used
// to render this UI component on the client or server
require('marko-widgets').renderable(exports, require('./renderer'));
github storybookjs / storybook / examples / marko-cli / src / components / marko-widgets / button / index.js View on Github external
htmlAttributes: input,
  };
}

function handleClick() {
  if (!this.state.disabled) {
    // eslint-disable-next-line no-undef,no-alert
    alert('button-click');
  }
}

function getInitialBody(input) {
  return input.body;
}

module.exports = markoWidgets.defineComponent({
  template,
  getInitialState,
  getTemplateData,
  getInitialBody,
  handleClick,
});
github marko-js / marko / test / autotests / components-pages-deprecated / custom-events / components / app-fancy-button / index.js View on Github external
module.exports = require('marko-widgets').defineComponent({
    template: require.resolve('./template.marko'),

    getTemplateData: function(state, input) {
        return {
            label: input.label
        };
    },

    emitPressEvent: function() {
        this.emit('press', { widget: this });
    }
});
github marko-js / marko / test / autotests / components-pages-deprecated / widget-config / components / app-foo / index.js View on Github external
module.exports = require('marko-widgets').defineComponent({
    template: require('./template.marko'),

    getWidgetConfig: function() {
        return {
            name: 'app-foo'
        };
    },

    init: function(widgetConfig) {
        this.widgetConfig = widgetConfig;
        window.fooWidget = this;
    }
});
github marko-js / marko / test / autotests-browser / widget-invoke-widget-id-dynamic / index.js View on Github external
var barRenderer = require('./components/app-bar/renderer').render;

module.exports = require('marko-widgets').defineComponent({
    template: require('./template.marko'),
    getTemplateData: function(input, out) {
        return {
            barRenderer: barRenderer,
            barWidgetId: 'myBar'
        };
    }
});
github marko-js / marko / test / autotests / components-pages-deprecated / init-widgets-tag / components / app-baz / index.js View on Github external
module.exports = require('marko-widgets').defineComponent({
    template: require('./template.marko'),

    init: function() {
        window.bazWidget = this;
    }
});

marko-widgets

<h1 align="center"> <!-- Logo --> <br/> marko-widgets@8 <br/>

MIT
Latest version published 9 days ago

Package Health Score

71 / 100
Full package analysis

Similar packages