Skip to content

Commit

Permalink
tooltip implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
NishantCoder108 committed Mar 2, 2024
1 parent a58522a commit 48a6f1a
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions src/components/BooksCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
CardFooter,
Image,
Link,
Tooltip,
} from "@nextui-org/react";
import DownloadBtn from "../assets/svg/download.svg";
import { BookState } from "../features/bookSlice";
Expand Down Expand Up @@ -48,21 +49,28 @@ const BooksCard = (props: BookState) => {
</p>
<div className="flex items-center justify-between w-full">
<p>{pages || 0} Pages</p>
<Button
isIconOnly
aria-label="download books"
className="bg-transparent"
radius="full"
href={download}
as={Link}
download={true}
<Tooltip
placement={"bottom"}
offset={-3}
showArrow
content="Download"
>
<img
alt="download books"
src={DownloadBtn}
className="w-4"
/>
</Button>
<Button
isIconOnly
aria-label="download books"
className="bg-transparent"
radius="full"
href={download}
as={Link}
download={true}
>
<img
alt="download books"
src={DownloadBtn}
className="w-4"
/>
</Button>
</Tooltip>
</div>
</CardFooter>
</Card>
Expand Down

0 comments on commit 48a6f1a

Please sign in to comment.