2025-09-23 14:18:04 +02:00
|
|
|
<template>
|
2025-10-03 16:51:44 +02:00
|
|
|
<div class="stats-output" :styles="styles">
|
|
|
|
|
<FCard>
|
|
|
|
|
<h6>{{ props.headline }}</h6>
|
|
|
|
|
<FOutput :name="props.name" :price="props.price">
|
|
|
|
|
<template #price>
|
|
|
|
|
<slot name="price"></slot>
|
|
|
|
|
</template>
|
|
|
|
|
</FOutput>
|
|
|
|
|
</FCard>
|
|
|
|
|
</div>
|
2025-09-23 14:18:04 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2025-10-03 16:51:44 +02:00
|
|
|
import { computed } from 'vue';
|
|
|
|
|
import FCard from '@/components/fcomponents/FCard.vue';
|
|
|
|
|
import FOutput from '@/components/fcomponents/FOutput.vue';
|
2025-09-23 14:18:04 +02:00
|
|
|
interface Props {
|
2025-10-03 16:51:44 +02:00
|
|
|
name?: string;
|
|
|
|
|
headline: string;
|
|
|
|
|
price: string | number;
|
|
|
|
|
width?: number;
|
2025-09-23 14:18:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface Styles {
|
2025-10-03 16:51:44 +02:00
|
|
|
width?: string;
|
2025-09-23 14:18:04 +02:00
|
|
|
}
|
|
|
|
|
|
2025-10-03 16:51:44 +02:00
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
|
|
|
name: '',
|
|
|
|
|
width: undefined,
|
|
|
|
|
});
|
2025-09-23 14:18:04 +02:00
|
|
|
|
|
|
|
|
const styles = computed(() => {
|
2025-10-03 16:51:44 +02:00
|
|
|
const returnObject: Styles = {};
|
|
|
|
|
if (props.width) {
|
|
|
|
|
returnObject.width = `${props.width}px`;
|
|
|
|
|
}
|
|
|
|
|
return returnObject;
|
2025-09-23 14:18:04 +02:00
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="sass">
|
|
|
|
|
.stats-output
|
|
|
|
|
.f-card
|
|
|
|
|
background-color: var(--color-secondary)
|
|
|
|
|
h6
|
|
|
|
|
margin: 0
|
|
|
|
|
font-size: 16px
|
|
|
|
|
letter-spacing: 0.15px
|
|
|
|
|
font-weight: 300
|
|
|
|
|
.f-card__body
|
|
|
|
|
display: flex
|
|
|
|
|
flex-direction: column
|
|
|
|
|
gap: 8px
|
|
|
|
|
padding: 8px
|
|
|
|
|
height: 100%
|
|
|
|
|
.token-price-wrapper
|
|
|
|
|
padding: 8px 16px
|
|
|
|
|
</style>
|