mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
26 lines
588 B
JavaScript
26 lines
588 B
JavaScript
|
import Component from '@ember/component';
|
||
|
import {computed} from '@ember/object';
|
||
|
|
||
|
export default Component.extend({
|
||
|
tagName: '',
|
||
|
|
||
|
instantClose: false,
|
||
|
isVisible: false,
|
||
|
style: null,
|
||
|
|
||
|
animationClasses: computed('isVisible', 'instantClose', function () {
|
||
|
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(' ');
|
||
|
})
|
||
|
});
|