Skip to content

Commit 9f89733

Browse files
committed
add components/bookmark
Signed-off-by: Jonathan Alvarez <[email protected]>
1 parent ba74600 commit 9f89733

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

components/bookmark.tsx

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { HeartIcon } from "@heroicons/react/24/solid"
2+
import type { BookmarkType } from "../app/bookmarks/schema"
3+
4+
export function Bookmark(bookmark: BookmarkType) {
5+
return (
6+
<div className="flex items-center">
7+
<button className="hover:scale-110 transition-transform">
8+
<HeartIcon
9+
className={`w-7 h-7 mr-3 ${bookmark.fav ? "text-red-500" : "text-slate-300"}`}
10+
/>
11+
</button>
12+
<a
13+
href={bookmark.url}
14+
rel="noopener noreferrer"
15+
target="_blank"
16+
className="hover:underline"
17+
>
18+
{bookmark.title} - {bookmark.url}
19+
</a>
20+
</div>
21+
)
22+
}

0 commit comments

Comments
 (0)