Created
September 11, 2014 17:25
-
-
Save webOS101/140179170e81ff4ce9bb to your computer and use it in GitHub Desktop.
Onyx Core Control Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.ready(function() { | |
enyo.kind({ | |
name: 'ControlSample', | |
components: [ | |
{ kind: 'onyx.Button', content: 'Click', ontap: 'tapped' }, | |
{ tag: 'br'}, | |
{ kind: 'onyx.Checkbox', checked: true, onchange: 'changed' }, | |
{ tag: 'br'}, | |
{ kind: 'onyx.InputDecorator', components: [ | |
{ kind: 'onyx.Input', placeholder: 'Enter something', | |
onchange: 'changed' } | |
]}, | |
{ tag: 'br'}, | |
{ kind: 'onyx.InputDecorator', components: [ | |
{ kind: 'onyx.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: 'ControlSample'}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Onyx Core Control Sample | |
description: Onyx versions of some core controls | |
authors: | |
- Roy Sutton | |
normalize_css: no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment