jellyfish-web/src/elements/emby-button/paper-icon-button-light.js

19 lines
543 B
JavaScript
Raw Normal View History

2020-08-14 08:46:34 +02:00
import layoutManager from '../../components/layoutManager';
import './emby-button.css';
import 'webcomponents.js';
2020-07-17 17:02:49 +01:00
const EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
2020-07-17 17:02:49 +01:00
EmbyButtonPrototype.createdCallback = function () {
2020-08-14 08:46:34 +02:00
this.classList.add('../../elements/emby-button/paper-icon-button-light');
2020-07-17 17:02:49 +01:00
if (layoutManager.tv) {
this.classList.add('show-focus');
}
};
2020-08-14 08:46:34 +02:00
document.registerElement('../../elements/emby-button/paper-icon-button-light', {
2020-07-17 17:02:49 +01:00
prototype: EmbyButtonPrototype,
extends: 'button'
});