2022-10-18 06:28:21 -07:00
|
|
|
<template>
|
2022-12-14 01:04:10 -08:00
|
|
|
<n8n-card :class="$style.card" v-on="$listeners">
|
2022-10-18 06:28:21 -07:00
|
|
|
<template #header v-if="!loading">
|
2022-12-14 01:04:10 -08:00
|
|
|
<span v-text="title" :class="$style.title" />
|
2022-10-18 06:28:21 -07:00
|
|
|
</template>
|
|
|
|
<n8n-loading :loading="loading" :rows="3" variant="p" />
|
|
|
|
<template #footer v-if="!loading">
|
|
|
|
<slot name="footer" />
|
|
|
|
</template>
|
|
|
|
</n8n-card>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2023-05-16 02:43:46 -07:00
|
|
|
import { defineComponent } from 'vue';
|
2022-11-23 04:41:53 -08:00
|
|
|
import { genericHelpers } from '@/mixins/genericHelpers';
|
2022-10-18 06:28:21 -07:00
|
|
|
|
2023-05-16 02:43:46 -07:00
|
|
|
export default defineComponent({
|
2022-10-18 06:28:21 -07:00
|
|
|
name: 'Card',
|
2023-05-16 02:43:46 -07:00
|
|
|
mixins: [genericHelpers],
|
2022-10-18 06:28:21 -07:00
|
|
|
props: {
|
|
|
|
loading: {
|
|
|
|
type: Boolean,
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" module>
|
|
|
|
.card {
|
|
|
|
width: 240px !important;
|
|
|
|
height: 140px;
|
|
|
|
margin-right: var(--spacing-2xs);
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
margin-right: var(--spacing-5xs);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
2022-12-14 01:04:10 -08:00
|
|
|
box-shadow: 0 2px 4px rgba(68, 28, 23, 0.07);
|
2022-10-18 06:28:21 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
> div {
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
|
|
display: -webkit-box;
|
|
|
|
-webkit-line-clamp: 4;
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
font-size: var(--font-size-s);
|
|
|
|
line-height: var(--font-line-height-regular);
|
|
|
|
font-weight: var(--font-weight-bold);
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: normal;
|
|
|
|
}
|
|
|
|
</style>
|