Getting Started
okayy is a confirm dialog for React. One function call, beautiful UI, fully customizable.
Install
npm install okayyAdd Confirmer to your app
Place <Confirmer /> anywhere in your root layout. Import the styles too.
import { Confirmer } from 'okayy';
import 'okayy/styles.css';
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<Confirmer />
</body>
</html>
);
}Show a confirm dialog
import { confirm } from 'okayy';
async function handleDelete() {
const ok = await confirm('Delete this item?');
if (ok) deleteItem();
}