mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
fix(frontend): highlight preceding stars on hover in LikertScale (#10948)
This commit is contained in:
@@ -188,7 +188,7 @@ export function LikertScale({
|
||||
|
||||
return selectedRating && selectedRating >= rating
|
||||
? "text-yellow-400"
|
||||
: "text-gray-300 hover:text-yellow-200";
|
||||
: "text-gray-300";
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -206,7 +206,12 @@ export function LikertScale({
|
||||
key={rating}
|
||||
onClick={() => handleRatingClick(rating)}
|
||||
disabled={isSubmitted}
|
||||
className={cn("text-xl transition-all", getButtonClass(rating))}
|
||||
className={cn(
|
||||
"oh-star text-xl transition-all",
|
||||
getButtonClass(rating),
|
||||
!isSubmitted &&
|
||||
"hover:text-yellow-400 [&:has(~.oh-star:hover)]:text-yellow-400",
|
||||
)}
|
||||
aria-label={`Rate ${rating} stars`}
|
||||
>
|
||||
<FaStar />
|
||||
|
||||
Reference in New Issue
Block a user