@xsolla/xui-toggletip-web 0.64.0-pr56.1768348754

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.
package/index.d.mts ADDED
@@ -0,0 +1,47 @@
1
+ import React, { ReactNode, CSSProperties } from 'react';
2
+
3
+ type ToggletipPlacement = "center" | "bottom-start" | "bottom-center" | "bottom-end" | "top-start" | "top-center" | "top-end" | "left-end" | "left-center" | "left-start" | "right-end" | "right-center" | "right-start";
4
+ interface ToggletipProps {
5
+ /**
6
+ * Trigger element.
7
+ */
8
+ children: ReactNode;
9
+ /**
10
+ * The title of the component.
11
+ */
12
+ title?: ReactNode;
13
+ /**
14
+ * The content of the tooltip.
15
+ */
16
+ content?: ReactNode;
17
+ /**
18
+ * Buttons displayed in the footer.
19
+ */
20
+ footer?: ReactNode;
21
+ /**
22
+ * Width for the component.
23
+ * @default "288px"
24
+ */
25
+ width?: string;
26
+ /**
27
+ * Placement relative to control.
28
+ * @default "top-center"
29
+ */
30
+ direction?: ToggletipPlacement;
31
+ /**
32
+ * Whether to change position automatically.
33
+ */
34
+ autoDirection?: boolean;
35
+ /**
36
+ * Distance from control.
37
+ * @default 12
38
+ */
39
+ offset?: number;
40
+ style?: CSSProperties;
41
+ "data-testid"?: string;
42
+ className?: string;
43
+ }
44
+
45
+ declare const Toggletip: React.ForwardRefExoticComponent<ToggletipProps & React.RefAttributes<any>>;
46
+
47
+ export { Toggletip, type ToggletipPlacement, type ToggletipProps };
package/index.d.ts ADDED
@@ -0,0 +1,47 @@
1
+ import React, { ReactNode, CSSProperties } from 'react';
2
+
3
+ type ToggletipPlacement = "center" | "bottom-start" | "bottom-center" | "bottom-end" | "top-start" | "top-center" | "top-end" | "left-end" | "left-center" | "left-start" | "right-end" | "right-center" | "right-start";
4
+ interface ToggletipProps {
5
+ /**
6
+ * Trigger element.
7
+ */
8
+ children: ReactNode;
9
+ /**
10
+ * The title of the component.
11
+ */
12
+ title?: ReactNode;
13
+ /**
14
+ * The content of the tooltip.
15
+ */
16
+ content?: ReactNode;
17
+ /**
18
+ * Buttons displayed in the footer.
19
+ */
20
+ footer?: ReactNode;
21
+ /**
22
+ * Width for the component.
23
+ * @default "288px"
24
+ */
25
+ width?: string;
26
+ /**
27
+ * Placement relative to control.
28
+ * @default "top-center"
29
+ */
30
+ direction?: ToggletipPlacement;
31
+ /**
32
+ * Whether to change position automatically.
33
+ */
34
+ autoDirection?: boolean;
35
+ /**
36
+ * Distance from control.
37
+ * @default 12
38
+ */
39
+ offset?: number;
40
+ style?: CSSProperties;
41
+ "data-testid"?: string;
42
+ className?: string;
43
+ }
44
+
45
+ declare const Toggletip: React.ForwardRefExoticComponent<ToggletipProps & React.RefAttributes<any>>;
46
+
47
+ export { Toggletip, type ToggletipPlacement, type ToggletipProps };