-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next.js - Reusable Confirm Dialog #12
Comments
Hello Punk! It's great having you contribute to this projectWelcome to the communityIf you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our GitHub Organisation - we help and encourage each other to contribute to open source little and often . Any questions let us know. |
Noice!!! 🔥🔥🔥 Using const handleConfirm = useCallback( () => {
console.log('confirmed!');
}, []); |
I will add this change, can you add a suggestion so that i commit change directly? Will finish it today, hehe i forget this one. |
Is this metaphor are ready to close? |
No, let me complete it! 😁 |
Complete and close this metaphor 💯 |
Metaphore Name
Next.js - Reusable Confirm Dialog
Share your metaphore story!
TODO: Add gif here!
TLDR
This is a complete guide on how to create a reusable confirm dialog component for
next.js
. Here we go!Prerequisites
Before you begin, ensure that you have
node
andnpm
orYarn
installed on your machine. Here is a run-down of the core technologies we will be using.flex
,pt-4
,text-center
androtate-90
that can be composed to build any design, directly in your markup.Setup
Create a next.js application with tailwind pre-configured:
npx create-next-app@latest --ts -e with-tailwindcss my_app # or yarn create next-app --typescript --example with-tailwindcss my_app
npm install @headlessui/react -s # or yarn add @headlessui/react
Components
ConfirmDialog
ButtonCancel
ButtonConfirm
How to use the component?
In order to use the
<ConfirmDialog />
component, you need to use a boolean state to display it:A demo/repos link
No response
The text was updated successfully, but these errors were encountered: