Releases: pheralb/toast
v0.2.3
✨ What's Changed
- ⚙️ Accessibility fixes for each notification & for the
Action
&Close
buttons. - 🚨 Add
.loading
variant (docs):
toast.loading({
text: 'Loading',
options: {
promise: yourFunction(),
success: 'Ready',
error: 'Error',
autoDismiss: true,
},
});
- 📚 Improved docs, fixed some links & updated
Toast
examples.
v0.2.2
💥 Breaking Changes
-
The
<ToasterProvider />
component has been removed. To render all toasts, use the<Toaster />
component instead. This change maintains the same API as previous versions. For more information, refer to the documentation.import { Toaster } from '@pheralb/toast'; <Toaster theme="light" maxToast={6} ... />
-
The
useToast
hook has been removed. To render a single toast anywhere in your application, use thetoast()
function. The API remains consistent with previous versions. For more details, see the documentation.import { toast } from '@pheralb/toast'; toast.success({ text: '✨ Hello', });
✨ What's Changed
-
💙 Types:
TheToastPosition
andToastVariant
types are now exported, allowing you to use them in your TypeScript projects for better type safety and autocompletion. -
📚 Documentation Update:
All examples have been updated to reflect the newtoast()
function and<Toaster />
component. -
📄 New Guide:
An Astro framework guide has been added to the documentation. This guide provides step-by-step instructions on how to integrate and use the library within Astro projects.
v0.1.3
✨ What's Changed
- Add
.default
,.info
,.success
,.error
,.warning
and.info
variants. - Add support for React Server Components (Next.js).
use client
by default. - Disable transitions if the user has disabled them in the system (
prefers-reduced-motion
). - Export
ToastProperties
,ToastProviderProperties
andToastTheme
types.
The first version of the library 🚀