cursor pointer for references
This commit is contained in:
@@ -7,14 +7,7 @@ import {
|
|||||||
TooltipTrigger,
|
TooltipTrigger,
|
||||||
} from "@/components/ui/tooltip";
|
} from "@/components/ui/tooltip";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import {
|
import { BookOpen, Check, Copy, FileText, Paperclip, X } from "lucide-react";
|
||||||
BookOpen,
|
|
||||||
Check,
|
|
||||||
Copy,
|
|
||||||
FileText,
|
|
||||||
Paperclip,
|
|
||||||
X,
|
|
||||||
} from "lucide-react";
|
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { TrackedButton } from "./util-tracked-button";
|
import { TrackedButton } from "./util-tracked-button";
|
||||||
@@ -53,7 +46,6 @@ export function PublicationCard({
|
|||||||
const buttonSize = "sm";
|
const buttonSize = "sm";
|
||||||
const buttonStyle = "ghost";
|
const buttonStyle = "ghost";
|
||||||
|
|
||||||
|
|
||||||
const handleCopy = () => {
|
const handleCopy = () => {
|
||||||
if (navigator.clipboard?.writeText) {
|
if (navigator.clipboard?.writeText) {
|
||||||
navigator.clipboard
|
navigator.clipboard
|
||||||
@@ -123,13 +115,12 @@ export function PublicationCard({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"cards flex items-start space-x-4 rounded-lg border p-4",
|
"cards cursor-pointer flex items-start space-x-4 rounded-lg border p-4",
|
||||||
url,
|
url,
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
id={bibtexKey}
|
id={bibtexKey}
|
||||||
onClick={handleCardClick}
|
onClick={handleCardClick}>
|
||||||
>
|
|
||||||
<div className="pointer-events-none relative h-24 w-24 flex-shrink-0">
|
<div className="pointer-events-none relative h-24 w-24 flex-shrink-0">
|
||||||
{ImageContent}
|
{ImageContent}
|
||||||
</div>
|
</div>
|
||||||
@@ -151,8 +142,7 @@ export function PublicationCard({
|
|||||||
size={buttonSize}
|
size={buttonSize}
|
||||||
className="h-7 w-7 cursor-pointer px-2 hover:border"
|
className="h-7 w-7 cursor-pointer px-2 hover:border"
|
||||||
onClick={handleDownload}
|
onClick={handleDownload}
|
||||||
eventName={`${bibtexKey}-bibfile`}
|
eventName={`${bibtexKey}-bibfile`}>
|
||||||
>
|
|
||||||
<FileText className="h-4 w-4" />
|
<FileText className="h-4 w-4" />
|
||||||
</TrackedButton>
|
</TrackedButton>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
@@ -168,8 +158,7 @@ export function PublicationCard({
|
|||||||
size={buttonSize}
|
size={buttonSize}
|
||||||
className="relative h-7 w-7 cursor-pointer px-2 hover:border"
|
className="relative h-7 w-7 cursor-pointer px-2 hover:border"
|
||||||
onClick={handleCopy}
|
onClick={handleCopy}
|
||||||
eventName={`${bibtexKey}-copycite`}
|
eventName={`${bibtexKey}-copycite`}>
|
||||||
>
|
|
||||||
{copyStatus === "idle" && <Copy className="h-4 w-4" />}
|
{copyStatus === "idle" && <Copy className="h-4 w-4" />}
|
||||||
{copyStatus === "success" && (
|
{copyStatus === "success" && (
|
||||||
<Check className="h-4 w-4 text-green-500" />
|
<Check className="h-4 w-4 text-green-500" />
|
||||||
@@ -190,14 +179,12 @@ export function PublicationCard({
|
|||||||
size={buttonSize}
|
size={buttonSize}
|
||||||
className="h-7 w-7 px-2 hover:border"
|
className="h-7 w-7 px-2 hover:border"
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
asChild
|
asChild>
|
||||||
>
|
|
||||||
<TrackedLink
|
<TrackedLink
|
||||||
href={pdfUrl}
|
href={pdfUrl}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
eventName={`${bibtexKey}-pdf`}
|
eventName={`${bibtexKey}-pdf`}
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer">
|
||||||
>
|
|
||||||
<BookOpen className="h-4 w-4" />
|
<BookOpen className="h-4 w-4" />
|
||||||
</TrackedLink>
|
</TrackedLink>
|
||||||
</Button>
|
</Button>
|
||||||
@@ -210,4 +197,4 @@ export function PublicationCard({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user