Merge changes from topic "gr-tooltip-content-ts"
* changes: Move gr-tooltip-content to typescript Rename gr-tooltip-content to keep histories
This commit is contained in:
@@ -14,36 +14,34 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../gr-icons/gr-icons.js';
|
||||
import {GestureEventListeners} from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
|
||||
import {LegacyElementMixin} from '@polymer/polymer/lib/legacy/legacy-element-mixin.js';
|
||||
import {PolymerElement} from '@polymer/polymer/polymer-element.js';
|
||||
import {htmlTemplate} from './gr-tooltip-content_html.js';
|
||||
import {TooltipMixin} from '../../../mixins/gr-tooltip-mixin/gr-tooltip-mixin.js';
|
||||
import '../gr-icons/gr-icons';
|
||||
import {GestureEventListeners} from '@polymer/polymer/lib/mixins/gesture-event-listeners';
|
||||
import {LegacyElementMixin} from '@polymer/polymer/lib/legacy/legacy-element-mixin';
|
||||
import {PolymerElement} from '@polymer/polymer/polymer-element';
|
||||
import {htmlTemplate} from './gr-tooltip-content_html';
|
||||
import {TooltipMixin} from '../../../mixins/gr-tooltip-mixin/gr-tooltip-mixin';
|
||||
import {customElement, property} from '@polymer/decorators';
|
||||
|
||||
/**
|
||||
* @extends PolymerElement
|
||||
*/
|
||||
class GrTooltipContent extends TooltipMixin(
|
||||
GestureEventListeners(
|
||||
LegacyElementMixin(
|
||||
PolymerElement))) {
|
||||
static get template() { return htmlTemplate; }
|
||||
|
||||
static get is() { return 'gr-tooltip-content'; }
|
||||
|
||||
static get properties() {
|
||||
return {
|
||||
maxWidth: {
|
||||
type: String,
|
||||
reflectToAttribute: true,
|
||||
},
|
||||
showIcon: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
};
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'gr-tooltip-content': GrTooltipContent;
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define(GrTooltipContent.is, GrTooltipContent);
|
||||
/**
|
||||
* Transclude anything inside and wrap them to support tooltip functionality.
|
||||
*/
|
||||
@customElement('gr-tooltip-content')
|
||||
export class GrTooltipContent extends TooltipMixin(
|
||||
GestureEventListeners(LegacyElementMixin(PolymerElement))
|
||||
) {
|
||||
static get template() {
|
||||
return htmlTemplate;
|
||||
}
|
||||
|
||||
@property({type: String, reflectToAttribute: true})
|
||||
maxWidth?: string;
|
||||
|
||||
@property({type: Boolean})
|
||||
showIcon = false;
|
||||
}
|
||||
Reference in New Issue
Block a user