el.xwx.moe/components/NoLinksFound.tsx

41 lines
1.3 KiB
TypeScript
Raw Normal View History

2023-07-19 16:49:54 -05:00
import { faPlus } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import React from "react";
import useModalStore from "@/store/modals";
2023-08-30 23:00:57 -05:00
type Props = {
text?: string;
};
export default function NoLinksFound({ text }: Props) {
2023-07-19 16:49:54 -05:00
const { setModal } = useModalStore();
return (
2023-11-25 04:54:43 -06:00
<div className="border border-solid border-neutral-content w-full h-full flex flex-col justify-center p-10 rounded-2xl bg-base-200">
2023-11-24 07:39:55 -06:00
<p className="text-center text-2xl">
2023-08-30 23:00:57 -05:00
{text || "You haven't created any Links Here"}
2023-07-19 16:49:54 -05:00
</p>
2023-11-24 07:39:55 -06:00
<div className="text-center w-full mt-4">
2023-07-19 16:49:54 -05:00
<div
onClick={() => {
setModal({
modal: "LINK",
state: true,
method: "CREATE",
});
}}
2023-08-30 23:00:57 -05:00
className="inline-flex gap-1 relative w-[11.4rem] items-center font-semibold select-none cursor-pointer p-2 px-3 rounded-full dark:hover:bg-sky-600 text-white bg-sky-700 hover:bg-sky-600 duration-100 group"
2023-07-19 16:49:54 -05:00
>
<FontAwesomeIcon
icon={faPlus}
2023-08-30 23:00:57 -05:00
className="w-5 h-5 group-hover:ml-[4.325rem] absolute duration-100"
2023-07-19 16:49:54 -05:00
/>
2023-08-30 23:00:57 -05:00
<span className="group-hover:opacity-0 text-right w-full duration-100">
Create New Link
2023-07-19 16:49:54 -05:00
</span>
</div>
</div>
</div>
);
}