@dashx/react 0.0.3 → 0.0.5
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/dist/index.d.ts +21 -3
- package/dist/index.es.js +11669 -2044
- package/dist/index.umd.js +232 -241
- package/dist/style.css +1 -0
- package/package.json +16 -17
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Client } from '@dashx/browser';
|
|
3
|
+
import { ClientParams } from '@dashx/browser';
|
|
3
4
|
import { default as default_2 } from 'react';
|
|
4
|
-
import {
|
|
5
|
+
import { InAppNotifications } from '@dashx/browser';
|
|
5
6
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
7
|
+
import { ToasterProps } from 'react-hot-toast';
|
|
6
8
|
|
|
7
9
|
export declare function DashXProvider({ children, publicKey, baseUri, targetEnvironment, }: default_2.PropsWithChildren<ClientParams>): JSX_2.Element;
|
|
8
10
|
|
|
11
|
+
export declare const NotificationBell: () => JSX_2.Element;
|
|
12
|
+
|
|
9
13
|
export declare function Preference({ preference, onChange, renderPreference, }: PreferenceProps): JSX.Element;
|
|
10
14
|
|
|
11
15
|
declare interface PreferenceProps {
|
|
@@ -40,8 +44,22 @@ declare interface StoredPreference {
|
|
|
40
44
|
whatsapp: boolean;
|
|
41
45
|
}
|
|
42
46
|
|
|
47
|
+
export declare const Toast: (props: ToastProps) => JSX_2.Element;
|
|
48
|
+
|
|
49
|
+
declare type ToastProps = ToasterProps;
|
|
50
|
+
|
|
43
51
|
declare type UpdatePreferenceHandler = (event: ChangeEvent<HTMLInputElement>, preference: PreferenceType) => void;
|
|
44
52
|
|
|
45
|
-
export declare const useDashXProvider: () =>
|
|
53
|
+
export declare const useDashXProvider: () => Client;
|
|
54
|
+
|
|
55
|
+
export declare const useInApp: () => UseInAppHookResponse;
|
|
56
|
+
|
|
57
|
+
declare type UseInAppHookResponse = {
|
|
58
|
+
notifications: InAppNotifications;
|
|
59
|
+
unreadNotificationsCount: number | null;
|
|
60
|
+
fetchInAppNotifications: () => void;
|
|
61
|
+
markNotificationAsRead: (id: string) => Promise<any>;
|
|
62
|
+
markNotificationAsUnread: (id: string) => Promise<any>;
|
|
63
|
+
};
|
|
46
64
|
|
|
47
65
|
export { }
|