Move editor CSS out to its own file.
This commit is contained in:
+5
-30
@@ -6,13 +6,15 @@ import {
|
|||||||
property,
|
property,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
css,
|
|
||||||
state,
|
state,
|
||||||
|
unsafeCSS,
|
||||||
} from 'lit-element';
|
} from 'lit-element';
|
||||||
import { HomeAssistant, fireEvent, LovelaceCardEditor } from 'custom-card-helpers';
|
import { HomeAssistant, fireEvent, LovelaceCardEditor } from 'custom-card-helpers';
|
||||||
|
|
||||||
import { FrigateCardConfig } from './types';
|
import { FrigateCardConfig } from './types';
|
||||||
|
|
||||||
|
import frigate_card_editor_style from './frigate-card-editor.scss'
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
required: {
|
required: {
|
||||||
icon: 'tune',
|
icon: 'tune',
|
||||||
@@ -236,35 +238,8 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor
|
|||||||
fireEvent(this, 'config-changed', { config: this._config });
|
fireEvent(this, 'config-changed', { config: this._config });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return compiled CSS styles (thus safe to use with unsafeCSS).
|
||||||
static get styles(): CSSResult {
|
static get styles(): CSSResult {
|
||||||
return css`
|
return unsafeCSS(frigate_card_editor_style);
|
||||||
.option {
|
|
||||||
padding: 4px 0px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.row {
|
|
||||||
display: flex;
|
|
||||||
margin-bottom: -14px;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.title {
|
|
||||||
padding-left: 16px;
|
|
||||||
margin-top: -6px;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.secondary {
|
|
||||||
padding-left: 40px;
|
|
||||||
color: var(--secondary-text-color);
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.values {
|
|
||||||
padding-left: 16px;
|
|
||||||
background: var(--secondary-background-color);
|
|
||||||
display: grid;
|
|
||||||
}
|
|
||||||
ha-formfield {
|
|
||||||
padding-bottom: 8px;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
.option {
|
||||||
|
padding: 4px 0px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.row {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: -14px;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
padding-left: 16px;
|
||||||
|
margin-top: -6px;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
.secondary {
|
||||||
|
padding-left: 40px;
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
.values {
|
||||||
|
padding-left: 16px;
|
||||||
|
background: var(--secondary-background-color);
|
||||||
|
display: grid;
|
||||||
|
}
|
||||||
|
ha-formfield {
|
||||||
|
padding-bottom: 8px;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user