gejdr-frontend/components/ui/header/Link.vue
Lucien Cartier-Tilet 620f5b34f0
initial commit
Base appearance of the website is done, now onto adding features
2025-02-16 18:21:37 +01:00

16 lines
349 B
Vue

<template>
<RouterLink :to="props.path" :class="cssClass">
{{ props.name }}
</RouterLink>
</template>
<script setup lang="ts">
const props = defineProps<{
path: string;
name: string;
}>();
const route = useRoute();
const cssClass = computed((): string => (props.path === route.path ? 'bg-background-300' : 'bg-background'));
</script>