2019-05-21 00:10:42 +00:00
|
|
|
/**
|
|
|
|
* @module ToolbarSecretLink
|
|
|
|
* `ToolbarSecretLink` styles SecretLink for the Toolbar.
|
|
|
|
* It should only be used inside of `Toolbar`.
|
|
|
|
*
|
|
|
|
* @example
|
|
|
|
* ```js
|
|
|
|
* <Toolbar>
|
|
|
|
* <ToolbarActions>
|
|
|
|
* <ToolbarSecretLink @params={{array 'vault.cluster.policies.create'}} @type="add">
|
|
|
|
* Create policy
|
|
|
|
* </ToolbarSecretLink>
|
|
|
|
* </ToolbarActions>
|
|
|
|
* </Toolbar>
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* @param type="" {String} - Use "add" to change icon
|
|
|
|
*/
|
|
|
|
|
2019-04-29 15:19:03 +00:00
|
|
|
import OuterHTML from './outer-html';
|
|
|
|
import { computed } from '@ember/object';
|
2019-02-14 16:04:46 +00:00
|
|
|
|
2019-04-29 15:19:03 +00:00
|
|
|
export default OuterHTML.extend({
|
2021-12-17 03:44:29 +00:00
|
|
|
glyph: computed('type', function () {
|
2019-04-29 15:19:03 +00:00
|
|
|
if (this.type == 'add') {
|
2021-12-07 17:05:14 +00:00
|
|
|
return 'plus';
|
2019-04-29 15:19:03 +00:00
|
|
|
} else {
|
|
|
|
return 'chevron-right';
|
|
|
|
}
|
|
|
|
}),
|
2019-05-09 16:30:20 +00:00
|
|
|
tagName: '',
|
|
|
|
supportsDataTestProperties: true,
|
2019-02-14 16:04:46 +00:00
|
|
|
});
|