Ghost/ghost/admin/app/components/gh-token-input/label-token.js
2024-05-29 07:56:24 +00:00

18 lines
525 B
JavaScript

import DraggableObject from 'ember-drag-drop/components/draggable-object';
import classic from 'ember-classic-decorator';
import {alias} from '@ember/object/computed';
import {attributeBindings, classNames} from '@ember-decorators/component';
import {computed} from '@ember/object';
@classic
@attributeBindings('title')
@classNames('label-token')
export default class LabelToken extends DraggableObject {
@alias('content.name') name;
@computed('name')
get title() {
return this.name ?? 'Label';
}
}