Skip to content

Instantly share code, notes, and snippets.

@ndugger
Created September 2, 2018 06:20
Show Gist options
  • Save ndugger/669e4046a4e7f6aad589ff732f614060 to your computer and use it in GitHub Desktop.
Save ndugger/669e4046a4e7f6aad589ff732f614060 to your computer and use it in GitHub Desktop.
const Widget = require('../core/Widget');
const rgba = require('../color/rgba');
const mount = require('../system/mount');
const render = require('../system/render');
const Rectangle = require('../geometry/Rectangle');
class Application extends Widget {
get style () {
return {
default: {
urmom: {
width: 100,
height: 100,
fill: rgba(0, 0, 0, 255)
}
},
hover: {
urmom: {
fill: rgba(255, 0, 0, 255)
}
}
}
}
render () {
return [
render(Rectangle, { id: 'urmom' })
];
}
}
mount(global.document.getElementById('wtk'), Application);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment