2021-12-17 22:26:52 +01:00
|
|
|
import { ClassNames } from '../interfaces/class-names';
|
2019-12-23 19:22:54 +01:00
|
|
|
import WrappedElement from './wrapped-element';
|
|
|
|
|
|
|
|
export default class WrappedInput extends WrappedElement {
|
|
|
|
element: HTMLInputElement;
|
2021-12-17 22:26:52 +01:00
|
|
|
|
2019-12-23 19:22:54 +01:00
|
|
|
delimiter: string;
|
|
|
|
|
|
|
|
constructor({
|
|
|
|
element,
|
|
|
|
classNames,
|
|
|
|
delimiter,
|
|
|
|
}: {
|
|
|
|
element: HTMLInputElement;
|
|
|
|
classNames: ClassNames;
|
|
|
|
delimiter: string;
|
|
|
|
}) {
|
|
|
|
super({ element, classNames });
|
|
|
|
this.delimiter = delimiter;
|
|
|
|
}
|
|
|
|
|
|
|
|
get value(): string {
|
|
|
|
return this.element.value;
|
|
|
|
}
|
|
|
|
|
|
|
|
set value(value: string) {
|
|
|
|
this.element.setAttribute('value', value);
|
|
|
|
this.element.value = value;
|
|
|
|
}
|
|
|
|
}
|