Add open original hover action

This commit is contained in:
Jackson Harper 2024-02-26 14:44:58 +08:00
parent b135e79297
commit ba300cf14b

View file

@ -4,7 +4,7 @@ import { LibraryItemNode } from '../../../lib/networking/queries/useGetLibraryIt
import { LinkedItemCardAction } from './CardTypes'
import { Button } from '../../elements/Button'
import { theme } from '../../tokens/stitches.config'
import { DotsThree } from 'phosphor-react'
import { DotsThree, Share } from 'phosphor-react'
import { CardMenu } from '../CardMenu'
import { UserBasicData } from '../../../lib/networking/queries/useGetViewerQuery'
import { ArchiveIcon } from '../../elements/icons/ArchiveIcon'
@ -31,7 +31,7 @@ export const LibraryHoverActions = (props: LibraryHoverActionsProps) => {
overflow: 'clip',
height: '33px',
width: '162px',
width: '182px',
bg: '$thBackground',
display: 'flex',
@ -111,6 +111,17 @@ export const LibraryHoverActions = (props: LibraryHoverActionsProps) => {
>
<LabelIcon size={21} color={theme.colors.thNotebookSubtle.toString()} />
</Button>
<Button
title="Open original (o)"
style="hoverActionIcon"
onClick={(event) => {
props.handleAction('showOriginal')
event.preventDefault()
event.stopPropagation()
}}
>
<Share size={21} color={theme.colors.thNotebookSubtle.toString()} />
</Button>
<CardMenu
item={props.item}
viewer={props.viewer}