@saasmakers/ui 2.0.33 → 2.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,12 +21,17 @@ export default function useToast() {
21
21
  action?: BaseToastAction
22
22
  i18nParams?: Record<string, number | string>
23
23
  message: string
24
+ replaceAll?: boolean
24
25
  status?: BaseStatus
25
26
  }) => {
26
27
  if (!import.meta.client) {
27
28
  return
28
29
  }
29
30
 
31
+ if (params.replaceAll) {
32
+ clearToasts()
33
+ }
34
+
30
35
  const text = params.message.includes(' ')
31
36
  ? params.message
32
37
  : nuxtApp.$i18n.t(`toasts.${params.message}`, params.i18nParams ?? {})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "2.0.33",
3
+ "version": "2.0.34",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "license": "MIT",