-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from jesmak/master
Migrating from Polymer to Lit
- Loading branch information
Showing
1 changed file
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
class GithubEntityRow extends Polymer.Element { | ||
import { html, LitElement } from 'https://unpkg.com/[email protected]/lit-element.js?module'; | ||
|
||
static get template() { | ||
return Polymer.html` | ||
class GithubEntityRow extends LitElement { | ||
|
||
static get properties() { | ||
return { | ||
_hass: {}, | ||
_config: {}, | ||
}; | ||
} | ||
|
||
render() { | ||
return html` | ||
<style> | ||
.flex { | ||
display: flex; | ||
|
@@ -21,19 +30,19 @@ class GithubEntityRow extends Polymer.Element { | |
color: var(--primary-color); | ||
} | ||
</style> | ||
<hui-generic-entity-row hass="[[_hass]]" config="[[_config]]"> | ||
<hui-generic-entity-row .hass="${this._hass}" .config="${this._config}"> | ||
<div class="flex"> | ||
<div class="entity" on-click="issues" title="Open issues"> | ||
<div class="entity" @click="${this.issues}" title="Open issues"> | ||
<ha-icon class="icon" icon="mdi:alert-circle-outline"></ha-icon> | ||
<span>[[stateObjIssues.state]]</span> | ||
<span>${this.stateObjIssues.state}</span> | ||
</div> | ||
<div class="entity" on-click="pulls" title="Open pull requests"> | ||
<div class="entity" @click="${this.pulls}" title="Open pull requests"> | ||
<ha-icon class="icon" icon="mdi:source-pull"></ha-icon> | ||
<span>[[stateObjPRs.state]]</span> | ||
<span>${this.stateObjPRs.state}</span> | ||
</div> | ||
<div class="entity" on-click="stars" title="Stargazers"> | ||
<div class="entity" @click="${this.stars}" title="Stargazers"> | ||
<ha-icon class="icon" icon="mdi:star"></ha-icon> | ||
<span>[[stateObjStars.state]]</span> | ||
<span>${this.stateObjStars.state}</span> | ||
</div> | ||
</div> | ||
</hui-generic-entity-row> | ||
|