Skip to content

Commit

Permalink
Merge pull request #4 from jklein24/master
Browse files Browse the repository at this point in the history
Add is and move the script out of dom-module
  • Loading branch information
cdata committed May 4, 2015
2 parents 64f95d9 + 1058831 commit 9361301
Showing 1 changed file with 40 additions and 37 deletions.
77 changes: 40 additions & 37 deletions paper-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,44 +116,47 @@

</template>

<script>

Polymer({

behaviors: [
Polymer.PaperButtonBehavior
],

properties: {

/**
* If true, the button should be styled with a shadow.
*
* @attribute raised
* @type boolean
* @default false
*/
raised: {
type: Boolean,
reflectToAttribute: true,
value: false,
observer: '_buttonStateChanged'
}

},

ready: function() {
if (!this.hasAttribute('role')) {
this.setAttribute('role', 'button');
}
},

_buttonStateChanged: function() {
this._calculateElevation();
</dom-module>

<script>

Polymer({

is: 'paper-button',

behaviors: [
Polymer.PaperButtonBehavior
],

properties: {

/**
* If true, the button should be styled with a shadow.
*
* @attribute raised
* @type boolean
* @default false
*/
raised: {
type: Boolean,
reflectToAttribute: true,
value: false,
observer: '_buttonStateChanged'
}

});
},

</script>
ready: function() {
if (!this.hasAttribute('role')) {
this.setAttribute('role', 'button');
}
},

_buttonStateChanged: function() {
this._calculateElevation();
}

});

</script>

</dom-module>

0 comments on commit 9361301

Please sign in to comment.