1 import {Component} from "./component";
3 export class SettingColorPicker extends Component {
6 this.colorInput = this.$refs.input;
7 this.resetButton = this.$refs.resetButton;
8 this.defaultButton = this.$refs.defaultButton;
9 this.currentColor = this.$opts.current;
10 this.defaultColor = this.$opts.default;
12 this.resetButton.addEventListener('click', () => this.setValue(this.currentColor));
13 this.defaultButton.addEventListener('click', () => this.setValue(this.defaultColor));
17 this.colorInput.value = value;
18 this.colorInput.dispatchEvent(new Event('change'));