import { Button } from '@imphnen-frontend-service/ui/atoms'; import { InputField, Modal } from '@imphnen-frontend-service/ui/molecules'; interface IModalEditItem { isOpen: boolean; onClose: () => void; handleEditItem?: () => void; currentStep?: number; nextStep: () => void; prevStep: () => void; resetStep: () => void; } const ModalEditItem = ({ isOpen, onClose, currentStep, nextStep, resetStep, handleEditItem, }: IModalEditItem) => { return ( { onClose(); resetStep(); }} disableEscapeKeyDown={true} > {currentStep === 1 && } {currentStep === 2 && ( )} ); }; interface IStepOneProps { nextStep: () => void; onClose: () => void; } const StepOne = ({ nextStep }: IStepOneProps) => ( <> Edit Item Gacha Silakan mengubah detail dari item yang diperlukan Perbarui Item > ); interface IStepTwoProps { onClose: () => void; handleEditItem?: () => void; resetStep: () => void; } const StepTwo = ({ onClose, handleEditItem, resetStep }: IStepTwoProps) => ( <> Update Item Apakah kamu yakin dengan perubahan yang dilakukan? { onClose(); resetStep(); }} > Batal { handleEditItem && handleEditItem(); onClose(); resetStep(); }} > Update > ); export default ModalEditItem;
Silakan mengubah detail dari item yang diperlukan
Apakah kamu yakin dengan perubahan yang dilakukan?