Created
December 31, 2019 10:45
-
-
Save nasrulhazim/58e957fbc6965fea13ef5e23b7e0ad89 to your computer and use it in GitHub Desktop.
Custom Navigation using Laravel Nova Dashboard.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<card class="p-2 m-1 w-full" v-for="item in card.menus" :key="item.group"> | |
<div class="tab__header"> | |
<a href="#" class="tab__link p-4 block no-underline flex justify-between" @click.prevent="active = !active"> | |
<strong class="text-80">{{ item.group }}</strong> | |
<span class="down-Arrow text-80" v-show="!active">▼</span> | |
<span class="up-Arrow text-80" v-show="active">▲</span> | |
</a> | |
</div> | |
<div class="tab__content p-2" v-show="active"> | |
<ul class="list-reset"> | |
<li v-for="link in item.links" :key="item.group"> | |
<router-link :to="{ name: link.name, params: link.params}" | |
class="block no-underline text-90 hover:bg-30 p-3 cursor-pointer small"> | |
{{ link.label }} | |
</router-link> | |
</li> | |
</ul> | |
</div> | |
</card> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: [ | |
'card', | |
// The following props are only available on resource detail cards... | |
// 'resource', | |
// 'resourceId', | |
// 'resourceName', | |
], | |
data() { | |
return { | |
active: false, | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment