# Toast Notification Component
Komponen toast notification yang dinamis menggunakan Lucide React icons.
## Fitur
- ✅ 4 jenis toast: Success, Error, Warning, Info
- ✅ Auto-dismiss setelah durasi tertentu
- ✅ Manual close dengan tombol X
- ✅ Animasi smooth
- ✅ Responsive design
- ✅ TypeScript support
- ✅ Context-based state management
## Cara Penggunaan
### 1. Setup Provider
Bungkus aplikasi Anda dengan `ToastProvider`:
```tsx
import { ToastProvider } from "@/components/ui/toast";
export default function RootLayout({ children }) {
return (
{children}
);
}
```
### 2. Gunakan Hook useToast
```tsx
import { useToast } from "@/components/ui/toast";
export default function MyComponent() {
const { showSuccess, showError, showWarning, showInfo } = useToast();
const handleSuccess = () => {
showSuccess("Berhasil!", "Data telah disimpan dengan sukses.");
};
const handleError = () => {
showError("Gagal!", "Terjadi kesalahan saat menyimpan data.");
};
const handleWarning = () => {
showWarning("Peringatan!", "Data akan dihapus secara permanen.");
};
const handleInfo = () => {
showInfo("Informasi", "Sistem sedang dalam maintenance.");
};
return (