Skip to content

daveyplate/nextui-confirm-modal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NextUI Confirm Modal

Example usage:

import { useState } from "react"
import { ConfirmModal } from "@daveyplate/nextui-confirm-modal"

export default function MyComponent() {
    const [confirm, setConfirm] = useState(null)

    const showModal = () => {
        setConfirm({
            title: "Confirm",
            content: "Are you sure?",
            action: async () => {
                console.log("Confirmed")
            }
        })
    }
    
    return (
        <>
            <button onClick={showModal}>
                Show Modal
            </button>
            <ConfirmModal confirm={confirm} setConfirm={setConfirm} />
        </>
    )
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published