import {fadeIn, fadeOut} from "../services/animations";
import {onSelect} from "../services/dom";
+import {Component} from "./component";
/**
* Popup window that will contain other content.
* This component provides the show/hide functionality
* with the ability for popup@hide child references to close this.
- * @extends {Component}
*/
-class Popup {
+export class Popup extends Component {
setup() {
this.container = this.$el;
}
hide(onComplete = null) {
- fadeOut(this.container, 240, onComplete);
+ fadeOut(this.container, 120, onComplete);
if (this.onkeyup) {
window.removeEventListener('keyup', this.onkeyup);
this.onkeyup = null;
}
show(onComplete = null, onHide = null) {
- fadeIn(this.container, 240, onComplete);
+ fadeIn(this.container, 120, onComplete);
this.onkeyup = (event) => {
if (event.key === 'Escape') {
this.onHide = onHide;
}
-}
-
-export default Popup;
\ No newline at end of file
+}
\ No newline at end of file