Toast
A succinct message that is displayed temporarily.
# Demo
# Attributes
Name | Type | Default | Details |
---|---|---|---|
description | string | Required | You can pass description to show toast. |
title | string | ' ' | You can pass title to show toast with title. |
# usage
import { useToast } from 'nayan';
const Toast = () => {
const toast = useToast();
return (
<div>
<NButton onClick={() => toast('Simple Toaster!')}>
Show Simple Toast
</NButton>
<NButton className="ml-5" onClick={() => toast('Toaster Description!', 'Toaster Title')}>
Show Toast with Title
</NButton>
</div>
);
};
export default Toast;