open-vault/ui/lib/core/addon/components/linkable-item.js
Hamid Ghaf 27bb03bbc0
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

29 lines
1.1 KiB
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Component from '@glimmer/component';
import layout from '../templates/components/linkable-item';
import { setComponentTemplate } from '@ember/component';
/**
* @module LinkableItem
* LinkableItem components have two contextual components, a Content component used to show information on the left with a Menu component on the right, all aligned vertically centered. If passed a link, the block will be clickable.
*
* @example
* ```js
* <LinkableItem @link={{hash route='vault.backends' model='my-backend-path'}} data-test-row="my-backend-path">
* // Use <LinkableItem.content> and <LinkableItem.menu> here
* </LinkableItem>
* ```
*
* @param {object} [link=null] - Link should have route and model
* @param {boolean} [disabled=false] - If no link then should be given a disabled attribute equal to true
*/
/* eslint ember/no-empty-glimmer-component-classes: 'warn' */
class LinkableItemComponent extends Component {}
export default setComponentTemplate(layout, LinkableItemComponent);