Convert legacy Polyemer elements to class-based

This commit converts almost all Polymer elements from Polymer-function
based components to class-based components. There are few files which
should be converted manually after this commit.

Change-Id: I9e597e79053e0a6b5d5c0f1b54676d11b9d81db7
This commit is contained in:
Dmitrii Filippov
2019-11-15 16:16:46 +01:00
parent f0d5b6e49c
commit 3fd2b102e1
162 changed files with 9120 additions and 7751 deletions

View File

@@ -17,23 +17,29 @@
(function() {
'use strict';
Polymer({
is: 'gr-tooltip',
class GrTooltip extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin(
Polymer.Element)) {
static get is() { return 'gr-tooltip'; }
properties: {
text: String,
maxWidth: {
type: String,
observer: '_updateWidth',
},
positionBelow: {
type: Boolean,
reflectToAttribute: true,
},
},
static get properties() {
return {
text: String,
maxWidth: {
type: String,
observer: '_updateWidth',
},
positionBelow: {
type: Boolean,
reflectToAttribute: true,
},
};
}
_updateWidth(maxWidth) {
this.updateStyles({'--tooltip-max-width': maxWidth});
},
});
}
}
customElements.define(GrTooltip.is, GrTooltip);
})();