Commit 8ac50c62 authored by Adam Barth's avatar Adam Barth

Implement <sky-input>

This CL contains a basic input element.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/831353003
parent ed3cbb54
......@@ -4,10 +4,11 @@
// found in the LICENSE file.
-->
<sky>
<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement"/>
<import src="/sky/framework/sky-button/sky-button.sky"/>
<import src="/sky/framework/sky-box/sky-box.sky"/>
<import src="/sky/framework/sky-button/sky-button.sky"/>
<import src="/sky/framework/sky-checkbox/sky-checkbox.sky"/>
<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement"/>
<import src="/sky/framework/sky-input.sky"/>
<import src="/sky/framework/sky-radio/sky-radio.sky"/>
<sky-element name="widget-root">
<template>
......@@ -24,6 +25,8 @@
}
</style>
<sky-input id="text" value="Ready" />
<sky-box title='Buttons'>
<sky-button id='button' on-click='handleClick'>Button</sky-button>
<div>highlight: {{ myButton.highlight }}</div>
......@@ -56,10 +59,12 @@ module.exports = class extends SkyElement {
attached() {
this.myButton = this.shadowRoot.getElementById('button');
this.myCheckbox = this.shadowRoot.getElementById('checkbox');
this.myText = this.shadowRoot.getElementById('text');
this.clickCount = 0;
}
handleClick(event) {
this.clickCount++;
this.myText.value = "Moar clicking " + this.clickCount;
}
}.register();
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment