open-vault/ui/app/components/selectable-card.js
Angel Garbarino dc2f1f98b2
Glimmerizing StatusMenu/SelectableCard/PkiCertPopup (#15716)
* glimmerize status-menu

* selectable card start

* finish selectable card

* test fix

* pki-cert-popup glimmerize

* cleanup

* small fix

* nit

* one more nit

* pr comments
2022-06-02 14:40:04 -06:00

29 lines
1 KiB
JavaScript

import Component from '@glimmer/component';
/**
* @module SelectableCard
* SelectableCard components are card-like components that display a title, total, subtotal, and anything after the yield.
* They are designed to be used in containers that act as flexbox or css grid containers.
*
* @example
* ```js
* <SelectableCard @cardTitle="Tokens" @total={{totalHttpRequests}} @subText="Total"/>
* ```
* @param {string} [cardTitle] - cardTitle displays the card title.
* @param {number} [total = 0] - the number displayed as the largest text in the component.
* @param {string} [subText] - subText describes the total.
* @param {string} [actionText] - action text link.
* @param {string} [actionTo] - route where link will take you.
* @param {string} [queryParam] - tab for the route the link will take you.
* @param {string} [type] - type used in the link type.
*/
export default class SelectableCard extends Component {
get gridContainer() {
return this.args.gridContainer || false;
}
get total() {
return this.args.total || 0;
}
}