@simplybusiness/mobius 7.0.0 → 7.1.0

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.
@@ -0,0 +1,36 @@
1
+ import type { ReactNode } from "react";
2
+
3
+ export type ToastVariant = "info" | "success" | "warning" | "error";
4
+
5
+ export type ToastPosition =
6
+ | "top-left"
7
+ | "top-center"
8
+ | "top-right"
9
+ | "bottom-left"
10
+ | "bottom-center"
11
+ | "bottom-right";
12
+
13
+ export type ToastOptions = {
14
+ /** Title of the toast */
15
+ title?: string;
16
+ /** Description/body text of the toast */
17
+ description?: ReactNode;
18
+ /** Duration in milliseconds before auto-dismiss */
19
+ duration?: number;
20
+ /** Action button configuration */
21
+ action?: {
22
+ label: string;
23
+ onClick: () => void;
24
+ };
25
+ /** Cancel button configuration */
26
+ cancel?: {
27
+ label: string;
28
+ onClick?: () => void;
29
+ };
30
+ /** Callback when toast is dismissed */
31
+ onDismiss?: () => void;
32
+ /** Callback when toast auto-closes */
33
+ onAutoClose?: () => void;
34
+ /** Whether to show the close button (defaults to Toaster's closeButton prop) */
35
+ showCloseButton?: boolean;
36
+ };
@@ -43,6 +43,7 @@ export * from "./TextAreaInput";
43
43
  export * from "./TextField";
44
44
  export * from "./TextOrHTML";
45
45
  export * from "./Title";
46
+ export * from "./Toast";
46
47
  export * from "./Trust";
47
48
  export * from "./ExpandableText";
48
49
  export * from "./VisuallyHidden";