Ghost/ghost/admin/lib/koenig-editor/addon/components/kg-action-bar.js

29 lines
709 B
JavaScript
Raw Normal View History

2019-05-01 15:57:00 +03:00
import Component from '@ember/component';
import classic from 'ember-classic-decorator';
2019-05-01 15:57:00 +03:00
import {computed} from '@ember/object';
import {tagName} from '@ember-decorators/component';
2019-05-01 15:57:00 +03:00
@classic
@tagName('')
export default class KgActionBar extends Component {
instantClose = false;
isVisible = false;
style = null;
2019-05-01 15:57:00 +03:00
@computed('isVisible', 'instantClose')
get animationClasses() {
2019-05-01 15:57:00 +03:00
let {instantClose, isVisible} = this;
let classes = [];
if (!instantClose || (instantClose && isVisible)) {
classes.push('anim-fast-bezier');
}
if (!isVisible) {
classes.push('o-0 pop-down');
}
return classes.join(' ');
}
}