Created
September 17, 2014 20:45
-
-
Save webOS101/53aa1a2e6f5548fe3415 to your computer and use it in GitHub Desktop.
Styled Button
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; | |
} |
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: Styled Button | |
description: Demonstrates how to style an Onyx button using CSS | |
authors: | |
- Roy Sutton | |
normalize_css: no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment