diff --git a/playground/pages/navigation-menu.vue b/playground/pages/navigation-menu.vue index 523730dd..b49f7fbf 100644 --- a/playground/pages/navigation-menu.vue +++ b/playground/pages/navigation-menu.vue @@ -6,7 +6,7 @@ const variants = Object.keys(theme.variants.variant) const orientations = Object.keys(theme.variants.orientation) const color = ref(theme.defaultVariants.color) -const highlightColor = ref(theme.defaultVariants.highlightColor) +const highlightColor = ref() const variant = ref(theme.defaultVariants.variant) const orientation = ref('horizontal' as const) const highlight = ref(true) diff --git a/src/runtime/components/NavigationMenu.vue b/src/runtime/components/NavigationMenu.vue index c38227b3..ce88d2a6 100644 --- a/src/runtime/components/NavigationMenu.vue +++ b/src/runtime/components/NavigationMenu.vue @@ -85,7 +85,7 @@ const ui = computed(() => tv({ extend: navigationMenu, slots: props.ui })({ color: props.color, variant: props.variant, highlight: props.highlight, - highlightColor: props.highlightColor + highlightColor: props.highlightColor || props.color })) const lists = computed(() => props.items?.length ? (Array.isArray(props.items[0]) ? props.items : [props.items]) as T[][] : []) diff --git a/src/theme/navigation-menu.ts b/src/theme/navigation-menu.ts index 5a79ee17..ba7f93e8 100644 --- a/src/theme/navigation-menu.ts +++ b/src/theme/navigation-menu.ts @@ -58,7 +58,6 @@ export default (config: { colors: string[] }) => ({ linkLeadingIcon: 'text-gray-700 dark:text-gray-200', childLink: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white', childLinkIcon: 'text-gray-700 dark:text-gray-200' - }, false: { link: 'text-gray-500 dark:text-gray-400', @@ -168,7 +167,6 @@ export default (config: { colors: string[] }) => ({ }], defaultVariants: { color: 'primary', - highlightColor: 'primary', variant: 'pill' } }) diff --git a/test/components/__snapshots__/NavigationMenu.spec.ts.snap b/test/components/__snapshots__/NavigationMenu.spec.ts.snap index 3a2948ff..c5c4713c 100644 --- a/test/components/__snapshots__/NavigationMenu.spec.ts.snap +++ b/test/components/__snapshots__/NavigationMenu.spec.ts.snap @@ -463,7 +463,7 @@ exports[`NavigationMenu > renders with highlight link correctly 1`] = ` -