-
-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: replace native confirm * chore: cleanup
- Loading branch information
Showing
8 changed files
with
158 additions
and
120 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import type { Dispatch, FC } from 'react' | ||
import React from 'react' | ||
|
||
import { Button } from './Button' | ||
import Modal from './Modal' | ||
|
||
type Props = { | ||
showConfirm: boolean | ||
setShowConfirm: Dispatch<boolean> | ||
action: () => void | ||
} | ||
|
||
const Confirm: FC<Props> = ({ showConfirm, setShowConfirm, action }) => { | ||
return ( | ||
<Modal | ||
title="Confirmation" | ||
panelClassName="max-w-lg" | ||
show={showConfirm} | ||
onClose={() => setShowConfirm(false)} | ||
> | ||
<div className="pt-4"> | ||
<h5 className="pb-3">Are you sure want to continue?</h5> | ||
<span className="text-red-500 opacity-75"> | ||
This cannot be reverted. | ||
</span> | ||
<div className="flex justify-end space-x-2 pt-2"> | ||
<Button variant="hover" onClick={() => setShowConfirm(false)}> | ||
Cancel | ||
</Button> | ||
<Button onClick={action}>Confirm</Button> | ||
</div> | ||
</div> | ||
</Modal> | ||
) | ||
} | ||
|
||
export default Confirm |
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
c33730d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
embed – ./apps/embed
embed-git-main-lenstube.vercel.app
embed.lenstube.xyz
embed-lenstube.vercel.app
c33730d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
web – ./apps/web
web-git-main-lenstube.vercel.app
web-lenstube.vercel.app
lenstube.xyz
c33730d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.