From c46fbfbde39b025c5e1692477508c2162b65f4aa Mon Sep 17 00:00:00 2001 From: Mika Andrianarijaona Date: Thu, 2 Nov 2023 15:52:25 +0100 Subject: [PATCH] feat: add class when collection name is hovered during drag and drop Resolves #849 --- .../Collections/Collection/CollectionItem/StyledWrapper.js | 3 ++- .../Sidebar/Collections/Collection/CollectionItem/index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/StyledWrapper.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/StyledWrapper.js index ea58fe94..14d7432f 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/StyledWrapper.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/StyledWrapper.js @@ -33,7 +33,8 @@ const Wrapper = styled.div` overflow: hidden; } - &:hover { + &:hover, + &.item-hovered { background: ${(props) => props.theme.sidebar.collection.item.hoverBg}; .menu-icon { .dropdown { diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js index 31186e38..b12cfde1 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js @@ -84,7 +84,8 @@ const CollectionItem = ({ item, collection, searchText }) => { }); const itemRowClassName = classnames('flex collection-item-name items-center', { - 'item-focused-in-tab': item.uid == activeTabUid + 'item-focused-in-tab': item.uid == activeTabUid, + 'item-hovered': isOver }); const scrollToTheActiveTab = () => {