From 9f8b85f66889f27c22ee18a038ef76c25d4d5105 Mon Sep 17 00:00:00 2001 From: Phoomparin Mano Date: Tue, 19 Dec 2023 08:10:02 +0700 Subject: [PATCH] fix: css class precedence --- canvas/src/blocks/machine/components/MemoryViewer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/canvas/src/blocks/machine/components/MemoryViewer.tsx b/canvas/src/blocks/machine/components/MemoryViewer.tsx index 24d9d63..c680a81 100644 --- a/canvas/src/blocks/machine/components/MemoryViewer.tsx +++ b/canvas/src/blocks/machine/components/MemoryViewer.tsx @@ -200,8 +200,10 @@ export const MemoryViewer = memo((props: Props) => { className={cn( "select-none text-crimson-11 bg-stone-800 px-1 cursor-pointer", !selected && !highlighted && u === 0 && "text-gray-8", - selected && "bg-yellow-5 text-yellow-11 hover:text-yellow-12", - !selected && "hover:text-crimson-12", + !canDragOut && + selected && + "bg-yellow-5 text-yellow-11 hover:text-yellow-12", + !canDragOut && !selected && "hover:text-crimson-12", full && "text-center", canDragOut && !selected && "opacity-0 bg-transparent", canDragOut &&