-
-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: dialogs for project revive and delete
- Loading branch information
Showing
6 changed files
with
150 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
frontend/src/component/project/ProjectList/DeleteProjectDialog/DeleteProjectDialog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Dialogue } from 'component/common/Dialogue/Dialogue'; | ||
|
||
type DeleteProjectDialogProps = { | ||
name?: string; | ||
id?: string; | ||
open: boolean; | ||
onClose: () => void; | ||
onSubmit: () => void; | ||
}; | ||
|
||
export const DeleteProjectDialog = ({ | ||
name, | ||
id, | ||
open, | ||
onClose, | ||
onSubmit, | ||
}: DeleteProjectDialogProps) => ( | ||
<Dialogue | ||
open={open} | ||
// primaryButtonText={'Restore project'} | ||
secondaryButtonText='Close' | ||
onClose={onClose} | ||
onClick={onSubmit} | ||
title='Restore archived project' | ||
> | ||
Are you sure you'd like to delete project <strong>{name}</strong> (id:{' '} | ||
<code>{id}</code>)? | ||
{/* TODO: more explanation */} | ||
</Dialogue> | ||
); |
30 changes: 30 additions & 0 deletions
30
frontend/src/component/project/ProjectList/ReviveProjectDialog/ReviveProjectDialog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Dialogue } from 'component/common/Dialogue/Dialogue'; | ||
|
||
type ReviveProjectDialogProps = { | ||
name?: string; | ||
id?: string; | ||
open: boolean; | ||
onClose: () => void; | ||
onSubmit: () => void; | ||
}; | ||
|
||
export const ReviveProjectDialog = ({ | ||
name, | ||
id, | ||
open, | ||
onClose, | ||
onSubmit, | ||
}: ReviveProjectDialogProps) => ( | ||
<Dialogue | ||
open={open} | ||
// primaryButtonText={'Restore project'} | ||
secondaryButtonText='Close' | ||
onClose={onClose} | ||
onClick={onSubmit} | ||
title='Restore archived project' | ||
> | ||
Are you sure you'd like to restore project <strong>{name}</strong> (id:{' '} | ||
<code>{id}</code>)? | ||
{/* TODO: more explanation */} | ||
</Dialogue> | ||
); |