mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
20e7dc68e6
* style: update modals typography, alignment * style: made the modal separator full width * style: delete modals consistency * style: update the remaining delete modals * chore: delete modal secondary button text * style: update the remaining create modals * chore: update cancel button text * chore: created modal core * style: modals responsiveness
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
import { FC } from "react";
|
|
// types
|
|
import { TIssue } from "@plane/types";
|
|
// components
|
|
import { EModalPosition, EModalWidth, ModalCore } from "@/components/core";
|
|
import { InboxIssueCreateRoot, InboxIssueEditRoot } from "@/components/inbox/modals/create-edit-modal";
|
|
|
|
type TInboxIssueCreateEditModalRoot = {
|
|
workspaceSlug: string;
|
|
projectId: string;
|
|
modalState: boolean;
|
|
handleModalClose: () => void;
|
|
issue: Partial<TIssue> | undefined;
|
|
onSubmit?: () => void;
|
|
};
|
|
|
|
export const InboxIssueCreateEditModalRoot: FC<TInboxIssueCreateEditModalRoot> = (props) => {
|
|
const { workspaceSlug, projectId, modalState, handleModalClose, issue, onSubmit } = props;
|
|
|
|
return (
|
|
<ModalCore
|
|
isOpen={modalState}
|
|
handleClose={handleModalClose}
|
|
position={EModalPosition.TOP}
|
|
width={EModalWidth.XXXXL}
|
|
>
|
|
{issue && issue?.id ? (
|
|
<InboxIssueEditRoot
|
|
workspaceSlug={workspaceSlug}
|
|
projectId={projectId}
|
|
issueId={issue.id}
|
|
issue={issue}
|
|
handleModalClose={handleModalClose}
|
|
onSubmit={onSubmit}
|
|
/>
|
|
) : (
|
|
<InboxIssueCreateRoot workspaceSlug={workspaceSlug} projectId={projectId} handleModalClose={handleModalClose} />
|
|
)}
|
|
</ModalCore>
|
|
);
|
|
};
|