@pradip1995/theme-valero 2.0.0 → 2.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.
- package/README.md +6 -0
- package/package.json +5 -5
- package/src/slots/account/GoogleLogin/index.tsx +24 -0
package/README.md
CHANGED
|
@@ -14,3 +14,9 @@ import "@pradip1995/theme-valero/tokens/theme.css"
|
|
|
14
14
|
```bash
|
|
15
15
|
./scripts/create-theme.sh my-brand --from valero
|
|
16
16
|
```
|
|
17
|
+
|
|
18
|
+
## Google sign-in
|
|
19
|
+
|
|
20
|
+
- **`slots/account/GoogleLogin`** — themed "Continue with Google" button (used by login/register via `@modules/account/components/google-login`)
|
|
21
|
+
- **One Tap popup** — wired in the app root layout (`GoogleIdentityServicesScript` + `GoogleAuthShell`), not in theme slots
|
|
22
|
+
- Customize button styles in `slots/account/GoogleLogin` or via theme CSS
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pradip1995/theme-valero",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Valero Medusa storefront theme — Impulse-inspired design tokens and components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"./*": "./src/*"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@pradip1995/commerce-auth": "^2.
|
|
35
|
-
"@pradip1995/commerce-core": "^2.
|
|
34
|
+
"@pradip1995/commerce-auth": "^2.1.0",
|
|
35
|
+
"@pradip1995/commerce-core": "^2.1.0",
|
|
36
36
|
"@medusajs/types": ">=2",
|
|
37
37
|
"@medusajs/ui": ">=4",
|
|
38
38
|
"color": ">=5",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"react-dom": ">=19"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@pradip1995/commerce-auth": "^2.
|
|
45
|
-
"@pradip1995/commerce-core": "^2.
|
|
44
|
+
"@pradip1995/commerce-auth": "^2.1.0",
|
|
45
|
+
"@pradip1995/commerce-core": "^2.1.0",
|
|
46
46
|
"@medusajs/types": "latest",
|
|
47
47
|
"@medusajs/ui": "latest",
|
|
48
48
|
"@types/color": "^4.2.0",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { initiateGoogleAuth } from "@core/data/customer"
|
|
4
|
+
import { GoogleLoginButton } from "@pradip1995/commerce-auth/components/google-login"
|
|
5
|
+
import { useParams } from "next/navigation"
|
|
6
|
+
|
|
7
|
+
const BUTTON_CLASS =
|
|
8
|
+
"w-full flex items-center justify-center gap-2.5 py-3 px-4 border border-gray-200 bg-surface hover:bg-gray-50 transition-all shadow-sm hover:shadow-md active:scale-[0.98]"
|
|
9
|
+
|
|
10
|
+
type GoogleLoginProps = {
|
|
11
|
+
countryCode?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default function GoogleLogin({ countryCode: countryCodeProp }: GoogleLoginProps = {}) {
|
|
15
|
+
const params = useParams()
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<GoogleLoginButton
|
|
19
|
+
countryCode={countryCodeProp ?? (params?.countryCode as string | undefined)}
|
|
20
|
+
initiateAuth={initiateGoogleAuth}
|
|
21
|
+
className={BUTTON_CLASS}
|
|
22
|
+
/>
|
|
23
|
+
)
|
|
24
|
+
}
|