now menu is rendered one time only

This commit is contained in:
Geriano
2022-07-23 16:18:10 +07:00
parent ad2fd8e8b3
commit 0f925e09fd
4 changed files with 7 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ const open = ref(active ? true : false)
<template>
<div class="w-full flex flex-col">
<button @click.prevent="open = ! open" class="w-full p-4" :class="`${themes().get('sidebar', 'bg-slate-700 text-gray-200')} ${open && 'dark:bg-gray-800'} pl-${padding}`">
<button @click.prevent="open = ! open" class="w-full p-4" :class="`${themes().get('sidebar', 'bg-slate-700 text-gray-200')} ${open && 'dark:bg-gray-800'} pl-${padding !== 0 && padding}`">
<div class="flex items-center space-x-2">
<Icon :name="menu.icon" />
<p class="uppercase font-semibold w-full text-left">{{ menu.name }}</p>