33 lines
1 KiB
TypeScript
33 lines
1 KiB
TypeScript
|
|
import AddMilestoneForm from '@/components/Milestones/AddMilestoneForm';
|
||
|
|
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
||
|
|
|
||
|
|
interface MilestoneModalProps {
|
||
|
|
isOpen: boolean;
|
||
|
|
onClose: () => void;
|
||
|
|
onSuccess?: () => void;
|
||
|
|
}
|
||
|
|
|
||
|
|
export default function MilestoneModal({ isOpen, onClose, onSuccess }: MilestoneModalProps) {
|
||
|
|
const handleSuccess = () => {
|
||
|
|
if (onSuccess) {
|
||
|
|
onSuccess();
|
||
|
|
}
|
||
|
|
onClose();
|
||
|
|
};
|
||
|
|
|
||
|
|
return (
|
||
|
|
<Dialog open={isOpen} onOpenChange={onClose}>
|
||
|
|
<DialogContent className="bg-black border-red-500/30 text-red-400 max-w-md">
|
||
|
|
<DialogHeader>
|
||
|
|
<DialogTitle className="text-red-500 font-mono tracking-wide">
|
||
|
|
ADD MILESTONE
|
||
|
|
</DialogTitle>
|
||
|
|
</DialogHeader>
|
||
|
|
|
||
|
|
<div className="mt-4">
|
||
|
|
<AddMilestoneForm onSuccess={handleSuccess} />
|
||
|
|
</div>
|
||
|
|
</DialogContent>
|
||
|
|
</Dialog>
|
||
|
|
);
|
||
|
|
}
|