mirror of
https://github.com/fccview/cronmaster.git
synced 2025-12-23 22:18:20 -05:00
40 lines
887 B
TypeScript
40 lines
887 B
TypeScript
"use client";
|
|
|
|
import { Plus } from "lucide-react";
|
|
import { ScriptModal } from "@/app/_components/FeatureComponents/Modals/ScriptModal";
|
|
|
|
interface CreateScriptModalProps {
|
|
isOpen: boolean;
|
|
onClose: () => void;
|
|
onSubmit: (
|
|
formData: FormData
|
|
) => Promise<{ success: boolean; message: string }>;
|
|
form: {
|
|
name: string;
|
|
description: string;
|
|
content: string;
|
|
};
|
|
onFormChange: (updates: Partial<CreateScriptModalProps["form"]>) => void;
|
|
}
|
|
|
|
export const CreateScriptModal = ({
|
|
isOpen,
|
|
onClose,
|
|
onSubmit,
|
|
form,
|
|
onFormChange,
|
|
}: CreateScriptModalProps) => {
|
|
return (
|
|
<ScriptModal
|
|
isOpen={isOpen}
|
|
onClose={onClose}
|
|
onSubmit={onSubmit}
|
|
title="Create New Script"
|
|
submitButtonText="Create Script"
|
|
submitButtonIcon={<Plus className="h-4 w-4 mr-2" />}
|
|
form={form}
|
|
onFormChange={onFormChange}
|
|
/>
|
|
);
|
|
}
|