-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
859 additions
and
18 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
69 changes: 69 additions & 0 deletions
69
...MainContent/Settings/DangerZone/ConfirmArchiveProjectModal/ConfirmArchiveProjectModal.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,69 @@ | ||
import { FC } from "react"; | ||
import { | ||
Modal, | ||
ModalHeader, | ||
ModalBody, | ||
ModalFooter, | ||
ModalButton, | ||
} from "baseui/modal"; | ||
import { SIZE } from "baseui/button"; | ||
import styles, { ModalTitle } from "./styles"; | ||
import { Input } from "baseui/input"; | ||
|
||
export type ConfirmArchiveProjectModalProps = { | ||
isOpen: boolean; | ||
close: () => void; | ||
onArchive: () => void; | ||
projectSlug: string; | ||
isArchived: boolean; | ||
}; | ||
|
||
const ConfirmArchiveProjectModal: FC<ConfirmArchiveProjectModalProps> = ( | ||
props | ||
) => { | ||
const { isOpen, close, onArchive, projectSlug, isArchived } = props; | ||
|
||
return ( | ||
<Modal onClose={close} isOpen={isOpen} overrides={styles.Modal}> | ||
<ModalHeader> | ||
<ModalTitle>Are you sure?</ModalTitle> | ||
</ModalHeader> | ||
<ModalBody style={{ fontFamily: "Lexend" }}> | ||
<div> | ||
If you want to proceed, please type in the slug of this pipeline:{" "} | ||
<span style={{ fontWeight: 600, color: "#fff" }}>{projectSlug}</span> | ||
</div> | ||
<Input size="mini" overrides={styles.Input} /> | ||
</ModalBody> | ||
<ModalFooter> | ||
<ModalButton | ||
kind="tertiary" | ||
onClick={close} | ||
size={SIZE.compact} | ||
style={{ fontFamily: "Lexend", backgroundColor: "initial" }} | ||
> | ||
Cancel | ||
</ModalButton> | ||
<ModalButton | ||
onClick={() => onArchive()} | ||
size={SIZE.compact} | ||
overrides={{ | ||
BaseButton: { | ||
style: { | ||
fontFamily: "Lexend", | ||
backgroundColor: "#FF0000", | ||
":hover": { | ||
backgroundColor: "#FF0000", | ||
}, | ||
}, | ||
}, | ||
}} | ||
> | ||
{isArchived ? "Unarchive" : "Archive"} | ||
</ModalButton> | ||
</ModalFooter> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default ConfirmArchiveProjectModal; |
3 changes: 3 additions & 0 deletions
3
...c/Containers/Project/MainContent/Settings/DangerZone/ConfirmArchiveProjectModal/index.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,3 @@ | ||
import ConfirmArchiveProjectModal from "./ConfirmArchiveProjectModal"; | ||
|
||
export default ConfirmArchiveProjectModal; |
32 changes: 32 additions & 0 deletions
32
.../Containers/Project/MainContent/Settings/DangerZone/ConfirmArchiveProjectModal/styles.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,32 @@ | ||
import styled from "@emotion/styled"; | ||
|
||
export const ModalTitle = styled.h2` | ||
font-family: Lexend; | ||
font-size: 16px; | ||
font-weight: 600; | ||
margin: 0; | ||
`; | ||
|
||
export default { | ||
Modal: { | ||
Dialog: { | ||
style: { | ||
backgroundColor: "#0f0124", | ||
fontFamily: "Lexend", | ||
}, | ||
}, | ||
}, | ||
Input: { | ||
Root: { | ||
style: { | ||
marginTop: "8px", | ||
border: "1px solid #24ffb5", | ||
}, | ||
}, | ||
Input: { | ||
style: { | ||
fontFamily: "Lexend", | ||
}, | ||
}, | ||
}, | ||
}; |
69 changes: 69 additions & 0 deletions
69
...t/MainContent/Settings/DangerZone/ConfirmDeleteProjectModal/ConfirmDeleteProjectModal.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,69 @@ | ||
import { FC } from "react"; | ||
import { | ||
Modal, | ||
ModalHeader, | ||
ModalBody, | ||
ModalFooter, | ||
ModalButton, | ||
} from "baseui/modal"; | ||
import { SIZE } from "baseui/button"; | ||
import styles, { ModalTitle } from "./styles"; | ||
import { Input } from "baseui/input"; | ||
|
||
export type ConfirmDeleteProjectModalProps = { | ||
isOpen: boolean; | ||
close: () => void; | ||
onDelete: () => void; | ||
projectSlug: string; | ||
}; | ||
|
||
const ConfirmDeleteProjectModal: FC<ConfirmDeleteProjectModalProps> = ( | ||
props | ||
) => { | ||
const { isOpen, close, onDelete, projectSlug } = props; | ||
|
||
return ( | ||
<Modal onClose={close} isOpen={isOpen} overrides={styles.Modal}> | ||
<ModalHeader> | ||
<ModalTitle>Are you sure?</ModalTitle> | ||
</ModalHeader> | ||
<ModalBody style={{ fontFamily: "Lexend" }}> | ||
<div> | ||
This action cannot be undone. If you want to proceed, please type in | ||
the slug of this pipeline:{" "} | ||
<span style={{ fontWeight: 600, color: "#fff" }}>{projectSlug}</span> | ||
</div> | ||
<Input size="mini" overrides={styles.Input} /> | ||
</ModalBody> | ||
<ModalFooter> | ||
<ModalButton | ||
kind="tertiary" | ||
onClick={close} | ||
size={SIZE.compact} | ||
style={{ fontFamily: "Lexend", backgroundColor: "initial" }} | ||
> | ||
Cancel | ||
</ModalButton> | ||
<ModalButton | ||
onClick={() => onDelete()} | ||
size={SIZE.compact} | ||
overrides={{ | ||
BaseButton: { | ||
style: { | ||
fontFamily: "Lexend", | ||
backgroundColor: "#FF0000", | ||
":hover": { | ||
backgroundColor: "#FF0000", | ||
}, | ||
}, | ||
}, | ||
}} | ||
> | ||
Delete | ||
</ModalButton> | ||
</ModalFooter> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default ConfirmDeleteProjectModal; |
3 changes: 3 additions & 0 deletions
3
...rc/Containers/Project/MainContent/Settings/DangerZone/ConfirmDeleteProjectModal/index.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,3 @@ | ||
import ConfirmDeleteProjectModal from "./ConfirmDeleteProjectModal"; | ||
|
||
export default ConfirmDeleteProjectModal; |
Oops, something went wrong.