refactor: more tailwind components

This commit is contained in:
Tristan Yang
2023-01-30 09:29:07 +08:00
parent 0abf149188
commit 56bc64c521
5 changed files with 43 additions and 114 deletions
+25
View File
@@ -0,0 +1,25 @@
// import { useEffect } from "react";
import { ChatPrefixes } from "../../../app/config";
import { useTranslation } from "react-i18next";
type Props = {
context: "user" | "channel",
name: string
};
const DnDTip = ({ context, name }: Props) => {
const { t } = useTranslation("chat");
return (
<div
className={`flex justify-center items-center absolute left-0 top-0 w-full h-full bg-black/50`}
>
<div className={`p-4 drop-shadow-md rounded-lg bg-primary-300`}>
<div className="p-4 pt-16 border-2 border-dashed border-[#a5f3fc] rounded-md flex flex-col items-center text-white">
<h4 className="text-xl font-semibold">{`${t("send_to")} ${ChatPrefixes[context]}${name}`}</h4>
<span className="text-sm">Photos accept jpg, png, max size limit to 10M.</span>
</div>
</div>
</div>
);
};
export default DnDTip;