Files
bishengWeb/src/pages/DiffFlowPage/components/RunForm.tsx

29 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-06-24 15:28:24 +08:00
import { Button } from "@/components/bs-ui/button";
import { DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@/components/bs-ui/dialog";
import ChatReportForm from "@/pages/ChatAppPage/components/ChatReportForm";
import { useRef } from "react";
export default function RunForm({ show, flow, onChangeShow, onSubmit }) {
const formRef = useRef(null);
const handleSubmit = () => {
formRef.current.submit()
}
return <DialogContent className="sm:max-w-[625px]">
<DialogHeader>
<DialogTitle></DialogTitle>
<DialogDescription></DialogDescription>
</DialogHeader>
{
show && <ChatReportForm ref={formRef} type='diff' vid={flow.id} flow={flow} onStart={onSubmit} />
}
<DialogFooter>
<DialogClose>
2024-06-25 14:55:48 +08:00
<Button variant="outline" className="px-11 baogao-btn baogao-btn1" type="button" onClick={onChangeShow}></Button>
2024-06-24 15:28:24 +08:00
</DialogClose>
2024-06-25 14:55:48 +08:00
<Button type="submit" className="px-11 baogao-btn baogao-btn2" onClick={handleSubmit}></Button>
2024-06-24 15:28:24 +08:00
</DialogFooter>
</DialogContent>
};