From 0a809cf5f57e74db114d57459192af7962db8e48 Mon Sep 17 00:00:00 2001 From: Jared Scott Date: Wed, 18 Sep 2024 16:32:10 +0800 Subject: [PATCH] fix: #7201 Fix issue related to optional parameter --- components/lib/passthrough/tailwind/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/lib/passthrough/tailwind/index.js b/components/lib/passthrough/tailwind/index.js index c03b1761de..36c9ba56d3 100644 --- a/components/lib/passthrough/tailwind/index.js +++ b/components/lib/passthrough/tailwind/index.js @@ -263,8 +263,9 @@ const Tailwind = { 'transition-colors duration-200', // Transition duration style. 'focus:outline-none focus:outline-offset-0 focus:shadow-[inset_0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[inset_0_0_0_0.2rem_rgba(147,197,253,0.5)]', // Focus styles. { - 'border-gray-300 bg-white text-gray-700 hover:bg-white hover:border-gray-400 hover:text-gray-600 dark:bg-gray-900 dark:border-blue-900/40 dark:text-white/80 dark:hover:bg-gray-800/80': parent.state.activeIndex !== context.index, // Condition-based hover styles. - 'bg-white border-blue-500 text-blue-500 dark:bg-gray-900 dark:border-blue-300 dark:text-blue-300': parent.state.activeIndex === context.index // Condition-based active styles. + 'border-gray-300 bg-white text-gray-700 hover:bg-white hover:border-gray-400 hover:text-gray-600 dark:bg-gray-900 dark:border-blue-900/40 dark:text-white/80 dark:hover:bg-gray-800/80': + parent != null ? parent.state.activeIndex !== context.index : true, // Condition-based hover styles. + 'bg-white border-blue-500 text-blue-500 dark:bg-gray-900 dark:border-blue-300 dark:text-blue-300': parent != null ? parent.state.activeIndex === context.index : false // Condition-based active styles. } ), style: { marginBottom: '-2px' } // Negative margin style.