You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
396 B
15 lines
396 B
4 years ago
|
import { Field } from './Field';
|
||
|
|
||
|
// ::- A field class for single-line text fields.
|
||
|
export class TextField extends Field {
|
||
|
render() {
|
||
|
let input = document.createElement('input');
|
||
|
input.type = 'text';
|
||
|
input.placeholder = this.options.label;
|
||
|
input.className = this.options.class;
|
||
|
input.value = this.options.value || '';
|
||
|
input.autocomplete = 'off';
|
||
|
return input;
|
||
|
}
|
||
|
}
|