@transferwise/components 45.9.4 → 45.10.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.
- package/build/es/no-polyfill/avatar/Avatar.js +1 -1
- package/build/es/no-polyfill/dateInput/DateInput.js +1 -1
- package/build/es/no-polyfill/i18n/ja.json +3 -3
- package/build/es/no-polyfill/i18n/pl.json +1 -1
- package/build/es/no-polyfill/i18n/zh_CN.json +44 -0
- package/build/es/no-polyfill/nudge/Nudge.js +1 -1
- package/build/es/no-polyfill/nudge/Nudge.spec.js +1 -1
- package/build/es/no-polyfill/nudge/Nudge.story.js +1 -1
- package/build/es/polyfill/avatar/Avatar.js +1 -1
- package/build/es/polyfill/dateInput/DateInput.js +1 -1
- package/build/es/polyfill/i18n/ja.json +3 -3
- package/build/es/polyfill/i18n/pl.json +1 -1
- package/build/es/polyfill/i18n/zh_CN.json +44 -0
- package/build/es/polyfill/nudge/Nudge.js +1 -1
- package/build/es/polyfill/nudge/Nudge.spec.js +1 -1
- package/build/es/polyfill/nudge/Nudge.story.js +1 -1
- package/build/i18n/ja.json +3 -3
- package/build/i18n/pl.json +1 -1
- package/build/i18n/zh_CN.json +44 -0
- package/build/main.css +1 -1
- package/build/styles/avatar/Avatar.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/types/nudge/Nudge.d.ts +8 -1
- package/build/types/nudge/Nudge.story.d.ts +1 -1
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +2 -2
|
@@ -28,13 +28,20 @@ type BaseProps = {
|
|
|
28
28
|
export interface OptionalId extends BaseProps {
|
|
29
29
|
id?: string;
|
|
30
30
|
persistDismissal?: false;
|
|
31
|
+
isPreviouslyDismissed?: undefined;
|
|
31
32
|
}
|
|
32
33
|
export interface RequiredPersistProps extends BaseProps {
|
|
33
34
|
/** This ID should be completely unique to the page and feature as it uses a shared array which could conflict with other nudges in Wise */
|
|
34
35
|
id: string;
|
|
35
36
|
/** Use persist dismissal to keep the nudge dismissed using the browser's localStorage */
|
|
36
37
|
persistDismissal: true;
|
|
38
|
+
/**
|
|
39
|
+
* Fired on mount for determining if nudge has been dismissed before
|
|
40
|
+
*
|
|
41
|
+
* @param {boolean} value - set to true if dismissed previously
|
|
42
|
+
*/
|
|
43
|
+
isPreviouslyDismissed?: (value: boolean) => void;
|
|
37
44
|
}
|
|
38
45
|
export type Props = OptionalId | RequiredPersistProps;
|
|
39
|
-
declare const Nudge: ({ media, mediaName, title, link, href, onClick, onDismiss, persistDismissal, id, className, }: Props) => JSX.Element | null;
|
|
46
|
+
declare const Nudge: ({ media, mediaName, title, link, href, onClick, onDismiss, persistDismissal, isPreviouslyDismissed, id, className, }: Props) => JSX.Element | null;
|
|
40
47
|
export default Nudge;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const _default: {
|
|
3
|
-
component: ({ media, mediaName, title, link, href, onClick, onDismiss, persistDismissal, id, className, }: import("./Nudge").Props) => JSX.Element | null;
|
|
3
|
+
component: ({ media, mediaName, title, link, href, onClick, onDismiss, persistDismissal, isPreviouslyDismissed, id, className, }: import("./Nudge").Props) => JSX.Element | null;
|
|
4
4
|
title: string;
|
|
5
5
|
};
|
|
6
6
|
export default _default;
|