You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
2.3 KiB
139 lines
2.3 KiB
<!--
|
|
/**
|
|
* Action Card Component - Platform Neutral Action Card
|
|
*
|
|
* Reusable card component for displaying actions
|
|
*
|
|
* @author Matthew Raymer
|
|
* @version 1.0.0
|
|
*/
|
|
-->
|
|
|
|
<template>
|
|
<div class="action-card" @click="handleClick" :class="{ loading: loading }">
|
|
<div class="card-content">
|
|
<div class="card-icon">{{ icon }}</div>
|
|
<div class="card-text">
|
|
<h3 class="card-title">{{ title }}</h3>
|
|
<p class="card-description">{{ description }}</p>
|
|
</div>
|
|
<div class="card-arrow">
|
|
<span v-if="loading" class="loading-spinner">⟳</span>
|
|
<span v-else class="arrow-icon">→</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
interface Props {
|
|
icon: string
|
|
title: string
|
|
description: string
|
|
loading?: boolean
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
loading: false
|
|
})
|
|
|
|
const emit = defineEmits<{
|
|
click: []
|
|
}>()
|
|
|
|
const handleClick = (): void => {
|
|
if (!props.loading) {
|
|
emit('click')
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.action-card {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.action-card:hover {
|
|
background: rgba(255, 255, 255, 0.15);
|
|
border-color: rgba(255, 255, 255, 0.3);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.action-card.loading {
|
|
cursor: not-allowed;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.card-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.card-icon {
|
|
font-size: 24px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.card-text {
|
|
flex: 1;
|
|
}
|
|
|
|
.card-title {
|
|
margin: 0 0 4px 0;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: white;
|
|
}
|
|
|
|
.card-description {
|
|
margin: 0;
|
|
font-size: 14px;
|
|
color: rgba(255, 255, 255, 0.8);
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.card-arrow {
|
|
flex-shrink: 0;
|
|
color: rgba(255, 255, 255, 0.6);
|
|
font-size: 18px;
|
|
}
|
|
|
|
.loading-spinner {
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* Mobile responsiveness */
|
|
@media (max-width: 768px) {
|
|
.action-card {
|
|
padding: 16px;
|
|
}
|
|
|
|
.card-content {
|
|
gap: 12px;
|
|
}
|
|
|
|
.card-icon {
|
|
font-size: 20px;
|
|
}
|
|
|
|
.card-title {
|
|
font-size: 15px;
|
|
}
|
|
|
|
.card-description {
|
|
font-size: 13px;
|
|
}
|
|
}
|
|
</style>
|
|
|