Sha256: 73944ecee87a75e7ebaa6cd74aed46773835eaefdbcd72a703b210f74352161d
Contents?: true
Size: 794 Bytes
Versions: 24
Compression:
Stored size: 794 Bytes
Contents
<template> <router-link :to="{ name: 'editPage', params: { locale: locale.prefix, pageId: pageId }, }" :key="locale.prefix" class="flex items-center px-4 py-4 hover:bg-gray-100 transition-colors duration-200 focus:outline-none cursor-pointer text-md" :class="{ 'font-bold': isActive }" > {{ locale.label }} </router-link> </template> <script> export default { name: 'LocaleTogglerLink', props: { locale: { type: Object, required: true }, defaultLocale: { type: Object, required: true }, }, computed: { isActive() { return this.locale.prefix === this.currentLocale }, pageId() { const map = this.currentPage.pathHash return map[this.locale.prefix] || map[this.defaultLocale.prefix] }, }, } </script>
Version data entries
24 entries across 24 versions & 1 rubygems