mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 02:11:44 +03:00
1be7dd1770
refs https://github.com/TryGhost/Ghost/issues/14101 - ran native classes codemod for koenig-editor in-repo-addon components - added `ember-classic-decorator` to addon's package.json to fix errors when importing Some files failed to convert automatically: ``` ❯ grep -rL "@classic\|default class" lib/koenig-editor/addon/components/**/*.js lib/koenig-editor/addon/components/koenig-alt-input.js lib/koenig-editor/addon/components/koenig-card-image.js lib/koenig-editor/addon/components/koenig-editor.js lib/koenig-editor/addon/components/koenig-toolbar.js ```
29 lines
709 B
JavaScript
29 lines
709 B
JavaScript
import Component from '@ember/component';
|
|
import classic from 'ember-classic-decorator';
|
|
import {computed} from '@ember/object';
|
|
import {tagName} from '@ember-decorators/component';
|
|
|
|
@classic
|
|
@tagName('')
|
|
export default class KgActionBar extends Component {
|
|
instantClose = false;
|
|
isVisible = false;
|
|
style = null;
|
|
|
|
@computed('isVisible', 'instantClose')
|
|
get animationClasses() {
|
|
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(' ');
|
|
}
|
|
}
|