fix styling

This commit is contained in:
Geriano
2022-07-23 15:11:25 +07:00
parent 6ebbfcb2ff
commit 4523dc01d2
3 changed files with 19 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ import Icon from '@/Components/Icon.vue'
const { menu } = defineProps({
menu: Object,
padding: Number,
})
const active = route().current(menu.route_or_url)
@@ -12,7 +13,7 @@ const link = route().has(menu.route_or_url) ? route(menu.route_or_url) : menu.ro
</script>
<template>
<Link :href="link" class="w-full px-4 py-3" :class="`${themes().get('sidebar', 'bg-slate-700 text-gray-200')} ${active && 'bg-slate-800'}`">
<Link :href="link" class="w-full px-4 py-3" :class="`${themes().get('sidebar', 'bg-slate-700 text-gray-200')} ${active && 'bg-slate-800'} pl-${padding}`">
<div class="flex items-center space-x-2">
<Icon :name="menu.icon" />
<p class="uppercase font-semibold">{{ menu.name }}</p>