Ghost/ghost/admin/lib/koenig-editor/addon/components/kg-action-bar.js
Kevin Ansfield 1be7dd1770 Ran native classes codemod for lib/koenig-editor/addon/components
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
```
2022-02-03 18:57:21 +00:00

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(' ');
}
}