Skip to content

Commit

Permalink
feat: update from lit-html/lit-element to lit
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider committed May 25, 2021
1 parent d91f41f commit 5a7d944
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 14 deletions.
83 changes: 79 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"array-flat-polyfill": "^1.0.1",
"custom-card-helpers": "^1.6.6",
"home-assistant-js-websocket": "^5.7.0",
"lit-element": "^2.4.0",
"lit-html": "^1.3.0",
"lit": "^2.0.0-rc.2",
"localforage": "^1.9.0",
"lz-string": "^1.4.4",
"moment": "^2.29.1",
Expand Down
13 changes: 7 additions & 6 deletions src/apexcharts-card.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'array-flat-polyfill';
import { LitElement, html, customElement, property, TemplateResult, CSSResult, PropertyValues } from 'lit-element';
import { ifDefined } from 'lit-html/directives/if-defined';
import { ClassInfo, classMap } from 'lit-html/directives/class-map';
import { LitElement, html, TemplateResult, PropertyValues, CSSResultGroup } from 'lit';
import { property, customElement } from 'lit/decorators.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { ClassInfo, classMap } from 'lit/directives/class-map.js';
import {
ChartCardConfig,
ChartCardSeriesConfig,
Expand Down Expand Up @@ -34,7 +35,7 @@ import {
validateOffset,
} from './utils';
import ApexCharts from 'apexcharts';
import { styles } from './styles';
import { stylesApex } from './styles';
import { HassEntity } from 'home-assistant-js-websocket';
import { getBrushLayoutConfig, getLayoutConfig } from './apex-layouts';
import GraphEntry from './graphEntry';
Expand Down Expand Up @@ -508,8 +509,8 @@ class ChartsCard extends LitElement {
return yaxisConfig;
}

static get styles(): CSSResult {
return styles;
static get styles(): CSSResultGroup {
return stylesApex;
}

protected render(): TemplateResult {
Expand Down
4 changes: 2 additions & 2 deletions src/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css, CSSResult } from 'lit-element';
import { css, CSSResultGroup } from 'lit';

export const styles: CSSResult = css`
export const stylesApex: CSSResultGroup = css`
:host {
display: block;
}
Expand Down

0 comments on commit 5a7d944

Please sign in to comment.