open-vault/ui/app/components/doc-link.js
2018-11-15 16:47:57 -06:00

21 lines
483 B
JavaScript

import Component from '@ember/component';
import { computed } from '@ember/object';
import hbs from 'htmlbars-inline-precompile';
export default Component.extend({
tagName: 'a',
classNames: ['doc-link'],
attributeBindings: ['target', 'rel', 'href'],
layout: hbs`{{yield}}`,
target: '_blank',
rel: 'noreferrer noopener',
host: 'https://www.vaultproject.io',
path: '/',
href: computed('host', 'path', function() {
return `${this.host}${this.path}`;
}),
});