ptitlutins/app/components/molecules/TripChip.vue
2026-06-10 23:37:21 +02:00

38 lines
906 B
Vue

<template>
<span :class="['trip-chip', { 'trip-chip--dim': dim }]">
<Icon :name="modeIcon(trip.mode)" size="0.85rem" />
{{ $t(`voyage.transport.${trip.mode}`) }}
</span>
</template>
<script setup lang="ts">
defineProps<{
/** Outgoing trip — only its transport mode is needed for the chip. */
trip: { mode: string }
/** Muted styling (used where the trip is secondary). */
dim?: boolean
}>()
</script>
<style scoped>
.trip-chip {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 3px 9px;
border-radius: var(--radius-pill);
background: var(--color-9);
border: 1px solid var(--color-8);
font-family: var(--font-body);
font-size: 0.7rem;
font-weight: var(--weight-semibold);
color: var(--color-3);
white-space: nowrap;
}
.trip-chip--dim {
background: var(--neutral-5);
border-color: var(--border-subtle);
color: var(--text-muted);
}
</style>