coze-realtime/src/components/ReceiveDialog/index.tsx

56 lines
2.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import {
Dialog,
DialogContent,
DialogTitle,
DialogDescription,
DialogClose
} from "@/components/ui/dialog";
import { Button } from "@/components/ui/button";
import { X } from "lucide-react";
import "./index.css";
export const ReceiveDialog = ({
isOpen = false,
onOpenChange,
onConfirm
}: {
isOpen?: boolean;
onOpenChange?: (open: boolean) => void;
onConfirm?: () => void;
}) => {
return (
<Dialog open={isOpen} onOpenChange={onOpenChange}>
<DialogContent className="sm:max-w-md border-none bg-transparent p-0 shadow-none">
<DialogTitle className="sr-only"></DialogTitle>
<DialogDescription className="sr-only"></DialogDescription>
<DialogClose className="absolute right-[38px] top-2 z-10 rounded-full w-[28px] h-[28px] bg-[#acacad] flex items-center justify-center bg-[#FFFFFF33]">
<X className="w-[12px] h-[12px] text-white"/>
<span className="sr-only" onClick={() => onOpenChange?.(false)}></span>
</DialogClose>
<div className="relative flex flex-col items-center">
<img
src="/icons/receive.png"
alt="接收"
className="rounded-lg w-full h-[286px] px-[48px]"
/>
<div className="absolute top-1/2 left-0 right-0 flex flex-col items-center px-[20px] py-[17px] text-center mx-[48px] rounded-[40px] custom-bg">
<h3 className="font-[600] text-[18px] text-black mb-[7px]">AI</h3>
<p className="text-sm text-white/90 mb-6 text-[#666]">AI~</p>
<div className="flex space-x-4 w-full justify-center">
<Button
className="bg-[#1580FF] text-white w-full rounded-[50px] text-[16px] py-[11px]"
onClick={() => {
onConfirm?.();
onOpenChange?.(false);
}}
>
</Button>
</div>
</div>
</div>
</DialogContent>
</Dialog>
);
};