Added tag support + Post link and many more changes and optimizations.

This commit is contained in:
Daniel
2023-02-24 21:02:28 +03:30
parent e0f4c71eb2
commit 9b53608097
36 changed files with 1062 additions and 176 deletions
+26
View File
@@ -0,0 +1,26 @@
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Collection } from "@prisma/client";
import { IconProp } from "@fortawesome/fontawesome-svg-core";
import { MouseEventHandler } from "react";
interface TextObject {
name: string;
}
interface SidebarItemProps {
item: Collection | TextObject;
icon: IconProp;
onClick?: MouseEventHandler;
}
export default function ({ item, icon, onClick }: SidebarItemProps) {
return (
<div
onClick={onClick}
className="hover:bg-gray-50 duration-100 text-sky-900 rounded my-1 p-3 cursor-pointer flex items-center gap-2"
>
<FontAwesomeIcon icon={icon} className="w-4 text-sky-300" />
<p>{item.name}</p>
</div>
);
}