Skip to content

Releases: pheralb/toast

v0.2.3

04 Aug 16:17
852938d
Compare
Choose a tag to compare

✨ 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

01 Aug 12:01
5810685
Compare
Choose a tag to compare

💥 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 the toast() 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:
    The ToastPosition and ToastVariant 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 new toast() 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

24 Jul 17:00
Compare
Choose a tag to compare

✨ 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 and ToastTheme types.

The first version of the library 🚀