radh-ui
Version:
Stencil Component Starter
89 lines (88 loc) • 2.51 kB
JavaScript
import { Component, Event, h, Prop } from "@stencil/core";
export class RadhInputText {
handleChange(ev) {
this.value = ev.target ? ev.target.value : null;
this.changed.emit(this.value);
}
render() {
return (h("label", null,
this.label,
h("input", { value: this.value, type: "text", name: this.name, onInput: ev => this.handleChange(ev) })));
}
static get is() { return "radh-input-text"; }
static get originalStyleUrls() { return {
"$": ["radh-input-text.css"]
}; }
static get styleUrls() { return {
"$": ["radh-input-text.css"]
}; }
static get properties() { return {
"label": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "label",
"reflect": false
},
"name": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "name",
"reflect": false
},
"value": {
"type": "string",
"mutable": true,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "value",
"reflect": false
}
}; }
static get events() { return [{
"method": "changed",
"name": "changed",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
}
}]; }
}