Files
vault/ui/lib/core/addon/components/learn-link.js
claire bontempo 9e10684662 UI: update host to new doc link location (developer.hashicorp.com/) (#18374)
* change host for doc link

* add todo to LearnLink

* add changelog
2022-12-14 23:25:16 +00:00

24 lines
687 B
JavaScript

import ExternalLink from './external-link';
/**
* @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.
*
*/
// TODO update host to 'https://developer.hashicorp.com' once updated paths are established
export default class LearnLinkComponent extends ExternalLink {
host = 'https://learn.hashicorp.com';
get href() {
return `${this.host}${this.args.path}`;
}
}