Hover titles for actions in home

This commit is contained in:
Jackson Harper
2024-07-09 14:38:01 +08:00
parent 944f444a57
commit 1b21617e24
2 changed files with 5 additions and 3 deletions

View File

@ -683,6 +683,7 @@ const TopPicksItemView = (
<HStack css={{ gap: '10px', my: '15px', px: '20px' }}> <HStack css={{ gap: '10px', my: '15px', px: '20px' }}>
{props.homeItem.canMove && ( {props.homeItem.canMove && (
<Button <Button
title="Add to library"
style="homeAction" style="homeAction"
onClick={async (event) => { onClick={async (event) => {
event.preventDefault() event.preventDefault()
@ -707,6 +708,7 @@ const TopPicksItemView = (
)} )}
{props.homeItem.canArchive && ( {props.homeItem.canArchive && (
<Button <Button
title="Archive"
style="homeAction" style="homeAction"
onClick={async (event) => { onClick={async (event) => {
event.preventDefault() event.preventDefault()
@ -731,6 +733,7 @@ const TopPicksItemView = (
)} )}
{props.homeItem.canDelete && ( {props.homeItem.canDelete && (
<Button <Button
title="Delete"
style="homeAction" style="homeAction"
onClick={async (event) => { onClick={async (event) => {
event.preventDefault() event.preventDefault()
@ -759,6 +762,7 @@ const TopPicksItemView = (
)} )}
{props.homeItem.canShare && ( {props.homeItem.canShare && (
<Button <Button
title="Share original"
style="homeAction" style="homeAction"
onClick={async (event) => { onClick={async (event) => {
event.preventDefault() event.preventDefault()

View File

@ -4,7 +4,7 @@ import { LibraryItemNode } from '../../../lib/networking/queries/useGetLibraryIt
import { LinkedItemCardAction } from './CardTypes' import { LinkedItemCardAction } from './CardTypes'
import { Button } from '../../elements/Button' import { Button } from '../../elements/Button'
import { theme } from '../../tokens/stitches.config' import { theme } from '../../tokens/stitches.config'
import { DotsThree, Share } from '@phosphor-icons/react' import { DotsThree } from '@phosphor-icons/react'
import { CardMenu } from '../CardMenu' import { CardMenu } from '../CardMenu'
import { UserBasicData } from '../../../lib/networking/queries/useGetViewerQuery' import { UserBasicData } from '../../../lib/networking/queries/useGetViewerQuery'
import { ArchiveIcon } from '../../elements/icons/ArchiveIcon' import { ArchiveIcon } from '../../elements/icons/ArchiveIcon'
@ -13,7 +13,6 @@ import { TrashIcon } from '../../elements/icons/TrashIcon'
import { LabelIcon } from '../../elements/icons/LabelIcon' import { LabelIcon } from '../../elements/icons/LabelIcon'
import { UnarchiveIcon } from '../../elements/icons/UnarchiveIcon' import { UnarchiveIcon } from '../../elements/icons/UnarchiveIcon'
import { BrowserIcon } from '../../elements/icons/BrowserIcon' import { BrowserIcon } from '../../elements/icons/BrowserIcon'
import useLibraryItemActions from '../../../lib/hooks/useLibraryItemActions'
import { MoveToInboxIcon } from '../../elements/icons/MoveToInboxIcon' import { MoveToInboxIcon } from '../../elements/icons/MoveToInboxIcon'
type LibraryHoverActionsProps = { type LibraryHoverActionsProps = {
@ -27,7 +26,6 @@ type LibraryHoverActionsProps = {
export const LibraryHoverActions = (props: LibraryHoverActionsProps) => { export const LibraryHoverActions = (props: LibraryHoverActionsProps) => {
const [menuOpen, setMenuOpen] = useState(false) const [menuOpen, setMenuOpen] = useState(false)
const { moveItem } = useLibraryItemActions()
return ( return (
<Box <Box