Created
September 17, 2014 20:50
-
-
Save webOS101/40f357b8dd37fd5d825b to your computer and use it in GitHub Desktop.
Styled Input
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
.onyx-button { | |
background-color: cyan; | |
} | |
.myapp .onyx-input { | |
background-color: tomato; | |
} |
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', | |
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'}); | |
}); |
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: 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