Skip to content

Instantly share code, notes, and snippets.

@webOS101
Created September 17, 2014 20:50
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/40f357b8dd37fd5d825b to your computer and use it in GitHub Desktop.
Save webOS101/40f357b8dd37fd5d825b to your computer and use it in GitHub Desktop.
Styled Input
.onyx-button {
background-color: cyan;
}
.myapp .onyx-input {
background-color: tomato;
}
enyo.ready(function() {
enyo.kind({
name: 'ControlSample',
classes: 'myapp',
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'});
});
name: Styled Input
description: Shows how to make a CSS selector more specific
authors:
- Roy Sutton
normalize_css: no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment