Skip to content

Instantly share code, notes, and snippets.

@webOS101
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webOS101/7551a535cd059907352d to your computer and use it in GitHub Desktop.
Save webOS101/7551a535cd059907352d to your computer and use it in GitHub Desktop.
Moonstone Core Controls
enyo.ready(function() {
enyo.kind({
name: 'View',
classes: 'moon',
components: [
{ kind: 'moon.Button', content: 'Hello', ontap: 'tapped' },
{ kind: 'moon.CheckboxItem', checked: true, content: 'Check me',
onchange: 'changed' },
{ kind: 'moon.InputDecorator', components: [
{ kind: 'moon.Input', placeholder: 'Enter something',
onchange: 'changed' }
] },
{ kind: 'moon.InputDecorator', components: [
{ kind: 'moon.RichText', value: '<i>Italics</i>',
onchange: 'changed' }
] }
],
tapped: function(sender, event) {
// React to taps
},
changed: function(sender, event) {
// React to changes
}
});
new enyo.Application({name: 'app', view: 'View'});
});
name: Moonstone Core Controls
description: Moonstone version of core controls
authors:
- Roy Sutton
normalize_css: no
dependencies:
- Moonstone
- iLib
- Layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment