Modals
1 month ago
skeletons
4 months ago
ActionButton.vue
5 months ago
ActionButtonsSection.vue
5 months ago
Banner.vue
3 months ago
FAQ.vue
5 months ago
FormItem.vue
2 months ago
FormsSection.vue
11 months ago
Hero.vue
1 month ago
Integrations.vue
4 months ago
Pagination.vue
10 months ago
PluginEntriesTable.vue
4 months ago
PluginEntry.vue
4 months ago
PluginExpansion.vue
8 months ago
ReachContactsSummary.vue
2 weeks ago
SyncStatusLabel.vue
6 months ago
Tabs.vue
9 months ago
Toggle.vue
10 months ago
UsageCard.vue
10 months ago
UsageCardsRow.vue
1 year ago
UsageCardsSection.vue
1 year ago
WooCommerce.vue
2 weeks ago
WooCommerceEntriesTable.vue
4 months ago
UsageCardsSection.vue
51 lines
| 1 | <script setup lang="ts"> |
| 2 | import UsageCard from '@/components/UsageCard.vue'; |
| 3 | import UsageCardsRow from '@/components/UsageCardsRow.vue'; |
| 4 | |
| 5 | interface UsageCardData { |
| 6 | title: string; |
| 7 | layout: 'horizontal' | 'vertical'; |
| 8 | metrics: Array<{ |
| 9 | label: string; |
| 10 | value: string | number; |
| 11 | hasIcon?: boolean; |
| 12 | tooltip?: string; |
| 13 | }>; |
| 14 | } |
| 15 | |
| 16 | interface Props { |
| 17 | usageCards: UsageCardData[]; |
| 18 | isLoading?: boolean; |
| 19 | } |
| 20 | |
| 21 | const props = withDefaults(defineProps<Props>(), { |
| 22 | isLoading: false |
| 23 | }); |
| 24 | </script> |
| 25 | |
| 26 | <template> |
| 27 | <div class="usage-cards-section"> |
| 28 | <UsageCardsRow :usage-cards="[props.usageCards[0], props.usageCards[1]]" :is-loading="props.isLoading" /> |
| 29 | <UsageCard |
| 30 | :title="props.usageCards[2].title" |
| 31 | :layout="props.usageCards[2].layout" |
| 32 | :metrics="props.usageCards[2].metrics" |
| 33 | :is-loading="props.isLoading" |
| 34 | /> |
| 35 | </div> |
| 36 | </template> |
| 37 | |
| 38 | <style scoped lang="scss"> |
| 39 | .usage-cards-section { |
| 40 | display: flex; |
| 41 | align-self: stretch; |
| 42 | gap: 12px; |
| 43 | } |
| 44 | |
| 45 | @media (max-width: 1023px) { |
| 46 | .usage-cards-section { |
| 47 | flex-direction: column; |
| 48 | } |
| 49 | } |
| 50 | </style> |
| 51 |