react-confirm-toast

Easy and light toast for confirming functions

Information

Install the package

yarn add react-confirm-toast

Import the component

import { ConfirmToast } from 'react-confirm-toast'

Add ConfirmToast to your app

<ConfirmToast customFunction={myFunction}>
	{your clickable component}
</ConfirmToast>

Pass it your function and set it up. Check the examples below!

Examples

<ConfirmToast
	asModal={false}
	customCancel={'Cancel'}
	customConfirm={'Confirm'}
	customFunction={myFunction}
	message={'Do you want to continue and execute the function?'}
	position={'bottom-left'}
	showCloseIcon={true}
	theme={'lilac'}
>
	<button> Example 1 </button>
</ConfirmToast>

Change position

Change theme

Version 1.0.7