yunohost-admin/app/src/components/globals/YBreadcrumb.vue
2024-03-02 02:48:52 +01:00

34 lines
653 B
Vue

<template>
<BBreadcrumb v-if="breadcrumb.length">
<BBreadcrumbItem to="/">
<span class="sr-only">{{ $t('home') }}</span>
<YIcon iname="home" />
</BBreadcrumbItem>
<BBreadcrumbItem
v-for="({ name, text }, i) in breadcrumb" :key="name"
:to="{ name }" :active="i === breadcrumb.length - 1"
>
{{ text }}
</BBreadcrumbItem>
</BBreadcrumb>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
name: 'YBreadcrumb',
computed: {
...mapGetters(['breadcrumb'])
}
}
</script>
<style lang="scss" scoped>
.breadcrumb {
border: none;
background-color: transparent;
}
</style>