* Update typescript, prettier, tslint -> eslint * Organize imports * Use glob for eslint fix react import
47 lines
1.1 KiB
JavaScript
47 lines
1.1 KiB
JavaScript
/*
|
|
Wrapper for paper-textarea.
|
|
|
|
paper-textarea crashes on iOS when created programmatically. This only impacts
|
|
our automation and script editors as they are using Preact. Polymer is using
|
|
template elements and does not have this issue.
|
|
|
|
paper-textarea issue: https://github.com/PolymerElements/paper-input/issues/556
|
|
WebKit issue: https://bugs.webkit.org/show_bug.cgi?id=174629
|
|
*/
|
|
|
|
import "@polymer/paper-input/paper-textarea";
|
|
import { html } from "@polymer/polymer/lib/utils/html-tag";
|
|
/* eslint-plugin-disable lit */
|
|
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
|
|
|
class HaTextarea extends PolymerElement {
|
|
static get template() {
|
|
return html`
|
|
<style>
|
|
:host {
|
|
display: block;
|
|
}
|
|
</style>
|
|
<paper-textarea
|
|
label="[[label]]"
|
|
placeholder="[[placeholder]]"
|
|
value="{{value}}"
|
|
></paper-textarea>
|
|
`;
|
|
}
|
|
|
|
static get properties() {
|
|
return {
|
|
name: String,
|
|
label: String,
|
|
placeholder: String,
|
|
value: {
|
|
type: String,
|
|
notify: true,
|
|
},
|
|
};
|
|
}
|
|
}
|
|
|
|
customElements.define("ha-textarea", HaTextarea);
|