From 4de9c278bf6b0f09876031d2648563e9518da2a7 Mon Sep 17 00:00:00 2001 From: Vincenzo Guerrisi Date: Mon, 13 May 2024 09:50:01 +0200 Subject: [PATCH] Day hover style has priority over selected style --- packages/bento-design-system/src/DateField/Day.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/bento-design-system/src/DateField/Day.tsx b/packages/bento-design-system/src/DateField/Day.tsx index 3afdc5002..bd1693988 100644 --- a/packages/bento-design-system/src/DateField/Day.tsx +++ b/packages/bento-design-system/src/DateField/Day.tsx @@ -47,7 +47,9 @@ function computeStyle(props: { return "focused"; } else return "default"; } else { - if (props.isStartDate) { + if (props.isInHoverRange) { + return "inHoverRange"; + } else if (props.isStartDate) { if (props.isEndDate) { return "selected"; } @@ -56,8 +58,6 @@ function computeStyle(props: { return "selectedEnd"; } else if (props.isInRange) { return "selectedRange"; - } else if (props.isInHoverRange) { - return "inHoverRange"; } else if (props.isFocused) { return "focused"; } else {