Skip to content

Instantly share code, notes, and snippets.

@alifhaikal88
Last active August 29, 2015 14:15
Show Gist options
  • Save alifhaikal88/4c0122726ec4980a0938 to your computer and use it in GitHub Desktop.
Save alifhaikal88/4c0122726ec4980a0938 to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
top: 0px;
left: 0px;
}
#input {
padding: 15px;
left: 210px;
top: 140px;
position: absolute;
}
#core_icon_button {
left: 440px;
top: 140px;
position: absolute;
}
</style>
<input id="input" placeholder="type something..." is="core-input" value="{{number}}">
<core-icon-button icon="menu" id="core_icon_button" theme="core-light-theme" on-tap="{{increment}}"></core-icon-button>
</template>
<script>
Polymer({
number : 0,
increment : function() {
this.number++;
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment