2022-06-02 20:40:04 +00:00
|
|
|
import Component from '@glimmer/component';
|
|
|
|
|
2020-02-13 19:44:57 +00:00
|
|
|
/**
|
|
|
|
* @module SelectableCard
|
2020-03-02 17:12:34 +00:00
|
|
|
* SelectableCard components are card-like components that display a title, total, subtotal, and anything after the yield.
|
2020-02-13 19:44:57 +00:00
|
|
|
* They are designed to be used in containers that act as flexbox or css grid containers.
|
|
|
|
*
|
|
|
|
* @example
|
|
|
|
* ```js
|
2020-03-02 17:12:34 +00:00
|
|
|
* <SelectableCard @cardTitle="Tokens" @total={{totalHttpRequests}} @subText="Total"/>
|
2020-02-13 19:44:57 +00:00
|
|
|
* ```
|
2022-06-02 20:40:04 +00:00
|
|
|
* @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.
|
2020-02-13 19:44:57 +00:00
|
|
|
*/
|
|
|
|
|
2022-06-02 20:40:04 +00:00
|
|
|
export default class SelectableCard extends Component {
|
|
|
|
get gridContainer() {
|
|
|
|
return this.args.gridContainer || false;
|
|
|
|
}
|
|
|
|
get total() {
|
|
|
|
return this.args.total || 0;
|
|
|
|
}
|
|
|
|
}
|