Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Raynos
Created October 29, 2013 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Raynos/7224374 to your computer and use it in GitHub Desktop.
Save Raynos/7224374 to your computer and use it in GitHub Desktop.
var dom = require("jsonml-stringify/dom")
var styleScoped = require("style-scoped")
var template = require("./template.js")
var style = require("./style")
module.exports = customWidget
function customWidget(options) {
options = options || {}
var css = style(options.theme)
var jsonml = template(...)
return styleScoped("custom-widget", css, dom(jsonml))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment