@dropins/storefront-auth 0.0.1-alpha17 → 0.0.1-alpha18
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as a,jsx as o,Fragment as r}from"@dropins/tools/preact-jsx-runtime.js";import{classes as u,Slot as m}from"@dropins/tools/lib.js";import{Button as s}from"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{r as d}from"../chunks/revokeCustomerToken.js";import{useText as f}from"@dropins/tools/i18n.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getStoreConfig.js";const h=({formSize:e="default",className:n="",slots:t,labels:i})=>{const c=f({headingText:"Auth.SuccessNotification.headingText",messageText:"Auth.SuccessNotification.messageText",primaryButtonText:"Auth.SuccessNotification.primaryButtonText",secondaryButtonText:"Auth.SuccessNotification.secondaryButtonText"});return a("div",{className:u(["auth-successNotificationForm",e,n]),children:[o("p",{className:"auth-successNotificationForm__title","data-testid":"notification-title",children:(i==null?void 0:i.headingText)||c.headingText}),o("p",{className:"auth-successNotificationForm__content-text","data-testid":"notification-content",children:(i==null?void 0:i.messageText)||c.messageText}),t!=null&&t.SuccessNotificationActions?o(m,{"data-testid":"successNotificationActions",name:"SuccessNotificationActions",slot:t==null?void 0:t.SuccessNotificationActions,context:{}}):a(r,{children:[o(s,{"data-testid":"primaryButton",type:"button",className:"auth-successNotificationForm__button auth-successNotificationForm__button--top",onClick:()=>window.location.href="/",children:c.primaryButtonText}),o(s,{"data-testid":"secondaryButton",type:"button",variant:"tertiary",onClick:async()=>{await d(),window.location.href="/"},children:c.secondaryButtonText})]})]})},F=({formSize:e="default",slots:n,className:t,labels:i})=>o("div",{className:"auth-success-notification",children:o(h,{formSize:e,className:t,slots:n,labels:i})});export{F as SuccessNotification,F as default};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@dropins/storefront-auth", "version": "0.0.1-
|
|
1
|
+
{"name": "@dropins/storefront-auth", "version": "0.0.1-alpha18", "@dropins/elsie": "0.28.2"}
|
|
@@ -6,8 +6,10 @@ export interface SuccessNotificationProps {
|
|
|
6
6
|
};
|
|
7
7
|
formSize?: 'default' | 'small';
|
|
8
8
|
className?: string;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
labels?: {
|
|
10
|
+
headingText: string;
|
|
11
|
+
messageText: string;
|
|
12
|
+
};
|
|
11
13
|
}
|
|
12
14
|
export interface SuccessNotificationFormProps extends SuccessNotificationProps {
|
|
13
15
|
}
|