Skip to content

Commit 61aa1cc

Browse files
centered button
1 parent 6e00a25 commit 61aa1cc

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/components/pdfViewer.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -121,34 +121,34 @@ export default function PdfViewer({ url, name }: PdfViewerProps) {
121121
<DialogTrigger>
122122
<FaShare></FaShare>
123123
</DialogTrigger>
124-
<DialogContent className="max-w-96">
124+
<DialogContent className="max-w-96 ">
125125
<DialogHeader>
126126
<DialogTitle>Share Papers with your friends!</DialogTitle>
127127
<DialogDescription>
128128
Either scan the QR or copy the link and share
129129
</DialogDescription>
130130
</DialogHeader>
131-
<div className="flex justify-center space-x-4">
131+
<div className="flex flex-col items-center justify-center gap-5 ">
132132
<QR url={paperPath}></QR>
133+
<Button
134+
type="submit"
135+
size="sm"
136+
className="flex w-fit items-center justify-between gap-5 px-3"
137+
onClick={async () => {
138+
await toast.promise(
139+
navigator.clipboard.writeText(paperPath), // This is a promise
140+
{
141+
success: "Link copied successfully",
142+
loading: "Copying link...",
143+
error: "Error copying link",
144+
},
145+
);
146+
}}
147+
>
148+
<p>Copy Link To Clipboard</p>
149+
<Copy />
150+
</Button>
133151
</div>
134-
<Button
135-
type="submit"
136-
size="sm"
137-
className="px-3"
138-
onClick={async () => {
139-
await toast.promise(
140-
navigator.clipboard.writeText(paperPath), // This is a promise
141-
{
142-
success: "Link copied successfully",
143-
loading: "Copying link...",
144-
error: "Error copying link",
145-
},
146-
);
147-
}}
148-
>
149-
<span className="sr-only">Copy</span>
150-
<Copy />
151-
</Button>
152152
</DialogContent>
153153
</Dialog>
154154
</div>

0 commit comments

Comments
 (0)