UI: Update <a> tags to LinkTo's (#17866)

* chore: shared external link component, glimmerization

* chore: update easy a tags

* chore: update other a tags

* chore: lil cleanup

* changelog
This commit is contained in:
Chelsea Shaw
2022-11-11 09:56:44 -06:00
committed by GitHub
parent 788391f4fd
commit 3c25033741
18 changed files with 105 additions and 78 deletions

View File

@@ -1,5 +1,22 @@
import DocLink from './doc-link';
import ExternalLink from './external-link';
export default DocLink.extend({
host: 'https://learn.hashicorp.com',
});
/**
* @module LearnLink
* `LearnLink` components are used to render anchor links to relevant Vault learn documentation at learn.hashicorp.com.
*
* @example
* ```js
<LearnLink @path="/docs/secrets/kv/kv-v2.html">Learn about KV v2</LearnLink>
* ```
*
* @param path="/"{String} - The path to documentation on learn.hashicorp.com that the component should link to.
*
*/
export default class LearnLinkComponent extends ExternalLink {
host = 'https://learn.hashicorp.com';
get href() {
return `${this.host}${this.args.path}`;
}
}