mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix hover behavior of library list hover actions
In the library list view, there is a toolbar of actions that appears over each entry when you hover over it. This change fixes the hover behavior of this toolbar so that you do not need to move the mouse cursor out and back into the library list item after archiving/deleting a previous item in order to re-activate the toolbar.
This commit is contained in:
parent
0afbb4fec1
commit
01856c3099
1 changed files with 2 additions and 10 deletions
|
|
@ -36,8 +36,6 @@ import { LoadingBar } from '../../elements/LoadingBar'
|
|||
|
||||
export function LibraryListCard(props: LinkedItemCardProps): JSX.Element {
|
||||
const router = useRouter()
|
||||
const [isHovered, setIsHovered] = useState(false)
|
||||
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
|
||||
const { refs, floatingStyles, context } = useFloating({
|
||||
|
|
@ -93,12 +91,6 @@ export function LibraryListCard(props: LinkedItemCardProps): JSX.Element {
|
|||
}}
|
||||
alignment="start"
|
||||
distribution="start"
|
||||
onMouseEnter={() => {
|
||||
setIsHovered(true)
|
||||
}}
|
||||
onMouseLeave={() => {
|
||||
setIsHovered(false)
|
||||
}}
|
||||
onClick={(event) => {
|
||||
if (event.metaKey || event.ctrlKey) {
|
||||
window.open(
|
||||
|
|
@ -120,11 +112,11 @@ export function LibraryListCard(props: LinkedItemCardProps): JSX.Element {
|
|||
item={props.item}
|
||||
viewer={props.viewer}
|
||||
handleAction={props.handleAction}
|
||||
isHovered={isHovered ?? false}
|
||||
isHovered={isOpen ?? false}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
<LibraryListCardContent {...props} isHovered={isHovered} />
|
||||
<LibraryListCardContent {...props} isHovered={isOpen} />
|
||||
</VStack>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue