-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
696d80e
commit 8323979
Showing
6 changed files
with
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Button, Modal } from '@mantine/core'; | ||
import { useDisclosure } from '@mantine/hooks'; | ||
interface ConfirmModalProps { | ||
children: React.ReactNode; | ||
title: React.ReactNode; | ||
confirmFc: () => void; | ||
loading?: boolean; | ||
} | ||
export default function ConfirmModal({ children, confirmFc, title, loading }: ConfirmModalProps) { | ||
const [opened, { open, close }] = useDisclosure(false); | ||
|
||
return ( | ||
<> | ||
<Modal opened={opened} onClose={close} title={title} size={'auto'}> | ||
<div className="p-6 w-[300px] text-center">Are you sure?</div> | ||
<div className="mt-4 flex justify-center gap-2 items-center"> | ||
<Button variant="outline" size="sm" onClick={close}> | ||
Cancel | ||
</Button> | ||
<Button onClick={confirmFc} size="sm" disabled={loading} loading={loading}> | ||
Confirm | ||
</Button> | ||
</div> | ||
</Modal> | ||
<button onClick={open}>{children}</button> | ||
</> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ export const PROJECT = { | |
version: '0.0.1', | ||
ogImage: | ||
'https://de4965e.webp.li/blog-images/2024/07/8c71d1b5dc982bf1dbe091d162f2bf46.png', | ||
sourceCode: 'https://github.com/AaronConlon/delete-github-repos-in-batches', | ||
sourceCode: 'https://github.com/AaronConlon/GitBatch', | ||
author: { | ||
name: 'Aaron Conlon', | ||
email: '[email protected]', | ||
|