diff --git a/apps/consent/app/components/button/primary-button-component.tsx b/apps/consent/app/components/button/primary-button-component.tsx
index a8e69330c5..0f9a86d7cf 100644
--- a/apps/consent/app/components/button/primary-button-component.tsx
+++ b/apps/consent/app/components/button/primary-button-component.tsx
@@ -25,8 +25,10 @@ const PrimaryButton: React.FC = ({
disabled={loadOrDisable}
{...buttonProps}
className={`flex-1 ${
- !loadOrDisable ? "bg-orange-500" : "bg-orange-600"
- } text-white p-2 rounded-lg text-sm hover:bg-orange-600`}
+ !loadOrDisable
+ ? "bg-[var(--primaryButtonBackground)]"
+ : "bg-[var(--primaryButtonBackground)]"
+ } text-[var(--primaryButtonFont)] p-2 rounded-lg text-sm hover:bg-[var(--primaryButtonBackground)]`}
>
{loadOrDisable ? : children}
diff --git a/apps/consent/app/components/button/secondary-button-component.tsx b/apps/consent/app/components/button/secondary-button-component.tsx
index 96815ddc0e..d786a98a60 100644
--- a/apps/consent/app/components/button/secondary-button-component.tsx
+++ b/apps/consent/app/components/button/secondary-button-component.tsx
@@ -21,7 +21,7 @@ const SecondaryButton: React.FC = ({
diff --git a/apps/consent/app/components/card/card.module.css b/apps/consent/app/components/card/card.module.css
index 7e98888271..bcb2de357b 100644
--- a/apps/consent/app/components/card/card.module.css
+++ b/apps/consent/app/components/card/card.module.css
@@ -6,11 +6,9 @@
@media (min-width: 768px) {
.card {
- background-color: white;
+ background-color: var(--backgroundColor);
border-radius: 0.5rem;
- box-shadow:
- rgba(0, 0, 0, 0.144) 0px 1px 3px 0px,
- rgba(27, 31, 35, 0.144) 0px 0px 0px 1px;
+ box-shadow: var(--shadow);
width: auto;
margin: auto;
width: 25em;
diff --git a/apps/consent/app/components/input-component.tsx b/apps/consent/app/components/input-component.tsx
index 5239156422..1df23590fb 100644
--- a/apps/consent/app/components/input-component.tsx
+++ b/apps/consent/app/components/input-component.tsx
@@ -9,11 +9,27 @@ const InputComponent: React.FC = ({ label, id, ...inputProps }) => {
return (
{label ? (
-
)
}
diff --git a/apps/consent/app/components/logo/index.tsx b/apps/consent/app/components/logo/index.tsx
index 36a60f68c7..bac3916a8c 100644
--- a/apps/consent/app/components/logo/index.tsx
+++ b/apps/consent/app/components/logo/index.tsx
@@ -1,11 +1,62 @@
import React from "react"
-import Image from "next/image"
const Logo: React.FC = () => {
return (
-
-
-
+
)
}
diff --git a/apps/consent/app/components/main-container/index.tsx b/apps/consent/app/components/main-container/index.tsx
index 77fc319166..cda502f690 100644
--- a/apps/consent/app/components/main-container/index.tsx
+++ b/apps/consent/app/components/main-container/index.tsx
@@ -6,7 +6,7 @@ interface MainContentProps {
const MainContent: React.FC = ({ children }) => {
return (
-
+
{children}
)
diff --git a/apps/consent/app/components/next-themes-provider.tsx b/apps/consent/app/components/next-themes-provider.tsx
new file mode 100644
index 0000000000..3a91385da6
--- /dev/null
+++ b/apps/consent/app/components/next-themes-provider.tsx
@@ -0,0 +1,11 @@
+"use client"
+import React, { ReactNode } from "react"
+import { ThemeProvider } from "next-themes"
+
+interface Props {
+ children: ReactNode
+}
+
+export default function Theme({ children }: Props) {
+ return {children}
+}
diff --git a/apps/consent/app/components/scope-item/scope-item.module.css b/apps/consent/app/components/scope-item/scope-item.module.css
index 66e3bc0922..f355cf0550 100644
--- a/apps/consent/app/components/scope-item/scope-item.module.css
+++ b/apps/consent/app/components/scope-item/scope-item.module.css
@@ -8,12 +8,14 @@
border-radius: 0.5rem;
margin-bottom: 0.5em;
position: relative;
+ color: var(--inputColor);
+ background-color: var(--inputBackground);
}
.custom_label {
position: relative;
cursor: pointer;
- flex-grow: 1;
+ flex-grow: 1;
}
.text-gray-700 {
diff --git a/apps/consent/app/components/separator.tsx b/apps/consent/app/components/separator.tsx
index 343f901929..6e881e4a53 100644
--- a/apps/consent/app/components/separator.tsx
+++ b/apps/consent/app/components/separator.tsx
@@ -8,13 +8,13 @@ const Separator: React.FC = ({ children }) => {
return (
)
diff --git a/apps/consent/app/consent/page.tsx b/apps/consent/app/consent/page.tsx
index 4272170982..3cee7b34ab 100644
--- a/apps/consent/app/consent/page.tsx
+++ b/apps/consent/app/consent/page.tsx
@@ -132,7 +132,7 @@ const Consent = async ({ searchParams }: { searchParams: ConsentProps }) => {
diff --git a/apps/consent/app/globals.css b/apps/consent/app/globals.css
index 3c1a8130bb..182e238a47 100644
--- a/apps/consent/app/globals.css
+++ b/apps/consent/app/globals.css
@@ -2,7 +2,6 @@
@tailwind components;
@tailwind utilities;
-
:root {
--transparent: rgba(0, 0, 0, 0);
--white: #ffffff;
@@ -31,26 +30,33 @@
--error: #dc2626;
--error9: #fee2e2;
--warning: #f59e0b;
-
- /* default */
}
[data-theme="light"] {
+ --backgroundColor: var(--white);
--overlayBackground: rgba(255, 255, 255, 0.746);
--backColor: var(--black);
--primaryButtonBackground: var(--orange);
--primaryButtonFont: var(--white);
--inputBackground: var(--grey5);
--inputColor: var(--black);
- background-color: var(--white);
+ --inputSecondary: var(--grey2);
+ --shadow:
+ rgba(0, 0, 0, 0.144) 0px 1px 3px 0px,
+ rgba(27, 31, 35, 0.144) 0px 0px 0px 1px;
}
[data-theme="dark"] {
+ --backgroundColor: var(--black);
--overlayBackground: rgba(16, 16, 16, 0.746);
--backColor: var(--white);
--primaryButtonBackground: var(--primary4);
--primaryButtonFont: var(--black);
--inputBackground: var(--darkGrey);
--inputColor: var(--white);
- background-color: var(--black);
-}
\ No newline at end of file
+ --inputSecondary: var(--grey4);
+ --shadow:
+ rgba(255, 255, 255, 0.144) 0px 1px 3px 0px,
+ rgba(227, 231, 235, 0.144) 0px 0px 0px 1px;
+}
+
diff --git a/apps/consent/app/layout.tsx b/apps/consent/app/layout.tsx
index dc1942f92d..d418641185 100644
--- a/apps/consent/app/layout.tsx
+++ b/apps/consent/app/layout.tsx
@@ -7,33 +7,33 @@ import type { Metadata } from "next"
import { Inter_Tight } from "next/font/google"
import { ToastContainer } from "react-toastify"
+import Theme from "./components/next-themes-provider"
+
const inter = Inter_Tight({ subsets: ["latin"] })
export const metadata: Metadata = {
- title: "Create Next App",
- description: "Generated by create next app",
+ title: "Blink Consent",
+ description: "OAuth2 Client For Blink.",
}
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
- <>
-
-
-
-
- {children}
-
-
- >
+
+
+
+
+ {children}
+
+
)
}
diff --git a/apps/consent/app/login/page.tsx b/apps/consent/app/login/page.tsx
index bda163217f..988f55988b 100644
--- a/apps/consent/app/login/page.tsx
+++ b/apps/consent/app/login/page.tsx
@@ -159,7 +159,7 @@ const Login = async ({ searchParams }: { searchParams: LoginProps }) => {
placeholder="Email Id"
/>
-
+
= ({ login_challenge, countryCodes })
) : null}
-
+
Phone
@@ -97,7 +100,7 @@ const LoginForm: React.FC = ({ login_challenge, countryCodes })
/>
-
+
{
it("Login email Test", () => {
cy.log("login challenge : ", login_challenge)
const email = testData.EMAIL
+ cy.wait(2000)
cy.get("[data-testid=email_id_input]").type(email)
cy.get("[data-testid=email_login_next_btn]").click()
cy.getOTP(email).then((otp) => {
diff --git a/apps/consent/cypress/e2e/phone-sign-in/login-phone.cy.ts b/apps/consent/cypress/e2e/phone-sign-in/login-phone.cy.ts
index cecf1d10ed..3f16218209 100644
--- a/apps/consent/cypress/e2e/phone-sign-in/login-phone.cy.ts
+++ b/apps/consent/cypress/e2e/phone-sign-in/login-phone.cy.ts
@@ -15,6 +15,7 @@ describe("Account ID Test", () => {
it("Verification Test", () => {
cy.log("login challenge : ", login_challenge)
+ cy.wait(2000)
cy.get("[data-testid=sign_in_with_phone_text]").click()
cy.get("[data-testid=phone_number_input]").type(testData.PHONE_NUMBER)
cy.get("[data-testid=phone_login_next_btn]").click()
@@ -36,6 +37,7 @@ describe("Account ID Test", () => {
})
cy.setCookie(login_challenge, cookieValue, { secure: true })
cy.visit(`/login/verification?login_challenge=${login_challenge}`)
+ cy.wait(2000)
cy.get("[data-testid=verification_code_input]").type(testData.VERIFICATION_CODE)
cy.get("[data-testid=submit_consent_btn]").click()
})
diff --git a/apps/consent/package.json b/apps/consent/package.json
index e5e057e7a9..bad4c29a9d 100644
--- a/apps/consent/package.json
+++ b/apps/consent/package.json
@@ -33,6 +33,7 @@
"graphql": "^16.8.1",
"libphonenumber-js": "^1.10.47",
"next": "latest",
+ "next-themes": "^0.2.1",
"react": "latest",
"react-dom": "latest",
"react-phone-number-input": "^3.3.6",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 004b544261..d7f714104f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -75,6 +75,9 @@ importers:
next:
specifier: latest
version: 13.5.6(@babel/core@7.23.2)(@opentelemetry/api@1.6.0)(react-dom@18.2.0)(react@18.2.0)
+ next-themes:
+ specifier: ^0.2.1
+ version: 0.2.1(next@13.5.6)(react-dom@18.2.0)(react@18.2.0)
react:
specifier: latest
version: 18.2.0
@@ -14085,6 +14088,18 @@ packages:
uuid: 8.3.2
dev: false
+ /next-themes@0.2.1(next@13.5.6)(react-dom@18.2.0)(react@18.2.0):
+ resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==}
+ peerDependencies:
+ next: '*'
+ react: '*'
+ react-dom: '*'
+ dependencies:
+ next: 13.5.6(@babel/core@7.23.2)(@opentelemetry/api@1.6.0)(react-dom@18.2.0)(react@18.2.0)
+ react: 18.2.0
+ react-dom: 18.2.0(react@18.2.0)
+ dev: false
+
/next@13.5.6(@babel/core@7.23.2)(@opentelemetry/api@1.6.0)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw==}
engines: {node: '>=16.14.0'}