mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Markdown format blueprint descriptions in import dialog (#8251)
This commit is contained in:
parent
b22455d2a5
commit
2ce70206c6
@ -1,9 +1,9 @@
|
|||||||
|
import "../../../components/ha-markdown";
|
||||||
import "@material/mwc-button";
|
import "@material/mwc-button";
|
||||||
import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable";
|
import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable";
|
||||||
import "@polymer/paper-input/paper-input";
|
import "@polymer/paper-input/paper-input";
|
||||||
import type { PaperInputElement } from "@polymer/paper-input/paper-input";
|
import type { PaperInputElement } from "@polymer/paper-input/paper-input";
|
||||||
import {
|
import {
|
||||||
css,
|
|
||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
@ -74,9 +74,10 @@ class DialogImportBlueprint extends LitElement {
|
|||||||
this._result.blueprint.metadata.domain
|
this._result.blueprint.metadata.domain
|
||||||
)}
|
)}
|
||||||
<br />
|
<br />
|
||||||
<p class="pre-line">
|
<ha-markdown
|
||||||
${this._result.blueprint.metadata.description}
|
breaks
|
||||||
</p>
|
.content=${this._result.blueprint.metadata.description}
|
||||||
|
></ha-markdown>
|
||||||
${this._result.validation_errors
|
${this._result.validation_errors
|
||||||
? html`
|
? html`
|
||||||
<p class="error">
|
<p class="error">
|
||||||
@ -211,15 +212,8 @@ class DialogImportBlueprint extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResult[] {
|
static get styles(): CSSResult {
|
||||||
return [
|
return haStyleDialog;
|
||||||
haStyleDialog,
|
|
||||||
css`
|
|
||||||
.pre-line {
|
|
||||||
white-space: pre-line;
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user