(add) navにfixedを追加

This commit is contained in:
kakkokari-gtyih 2024-01-21 11:51:14 +09:00
parent 91e87a99fc
commit 5f5848a5c9

View File

@ -1,7 +1,8 @@
<template>
<div
:class="[
'sticky top-0 z-[9900] transition',
'top-0 z-[9900] w-full transition',
fixed ? 'fixed' : 'sticky',
{
'shadow bg-opacity-90': (!disableShadow && scrollPos <= -40),
'bg-white dark:bg-gray-950': (disableShadow || scrollPos <= -40),
@ -101,11 +102,13 @@ const props = withDefaults(defineProps<{
slim?: boolean;
hasBorder?: boolean;
landing?: boolean;
fixed?: boolean;
}>(), {
disableShadow: false,
slim: false,
hasBorder: false,
landing: false,
fixed: false,
});
const navOpen = ref(false);