From 91afd7c5e2a00809834b51f9a758d66ea98dbd92 Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Mon, 25 Sep 2023 15:52:57 +0530 Subject: [PATCH 1/4] Fix Small screen device padding for change password --- .../ChangePasswordDialog/ChangePasswordDialogBase.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login-workflow/src/components/ChangePasswordDialog/ChangePasswordDialogBase.tsx b/login-workflow/src/components/ChangePasswordDialog/ChangePasswordDialogBase.tsx index d271a589..65f7b819 100644 --- a/login-workflow/src/components/ChangePasswordDialog/ChangePasswordDialogBase.tsx +++ b/login-workflow/src/components/ChangePasswordDialog/ChangePasswordDialogBase.tsx @@ -154,7 +154,7 @@ export const ChangePasswordDialogBase: React.FC = (pr Date: Mon, 25 Sep 2023 23:41:17 +0530 Subject: [PATCH 2/4] Update slots and slotprops in change password --- .../example/src/components/ChangePassword.tsx | 17 +++++++++++++++++ .../ChangePasswordDialog.tsx | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/login-workflow/example/src/components/ChangePassword.tsx b/login-workflow/example/src/components/ChangePassword.tsx index ea145a38..c939af86 100644 --- a/login-workflow/example/src/components/ChangePassword.tsx +++ b/login-workflow/example/src/components/ChangePassword.tsx @@ -3,6 +3,8 @@ import { ChangePasswordDialog } from '@brightlayer-ui/react-auth-workflow'; import { useApp } from '../contexts/AppContextProvider'; import { LocalStorage } from '../store/local-storage'; import { useNavigate } from 'react-router-dom'; +import { Box } from '@mui/material'; +import { Alarm } from '@mui/icons-material'; export const ChangePassword = (): JSX.Element => { const app = useApp(); @@ -20,6 +22,21 @@ export const ChangePassword = (): JSX.Element => { onPrevious={(): void => app.setShowChangePasswordDialog(false)} onSubmit={(): void => app.setShowChangePasswordDialog(false)} onFinish={(): void => logOut()} + slots={{ + SuccessScreen: (props): JSX.Element => ( + + {props?.icon} + {props?.messageTitle} + + ), + }} + slotProps={{ + SuccessScreen: { + icon: , + messageTitle: 'Yeah', + message: 'ee', + }, + }} /> ); }; diff --git a/login-workflow/src/components/ChangePasswordDialog/ChangePasswordDialog.tsx b/login-workflow/src/components/ChangePasswordDialog/ChangePasswordDialog.tsx index c1e4926e..51aca671 100644 --- a/login-workflow/src/components/ChangePasswordDialog/ChangePasswordDialog.tsx +++ b/login-workflow/src/components/ChangePasswordDialog/ChangePasswordDialog.tsx @@ -48,6 +48,8 @@ export const ChangePasswordDialog: React.FC = (props) ErrorDialogProps, loading, currentPasswordTextFieldProps, + slots = {}, + slotProps = {}, } = props; const [currentInput, setCurrentInput] = useState(''); @@ -147,6 +149,7 @@ export const ChangePasswordDialog: React.FC = (props) onSubmit={async (): Promise => { await changePasswordSubmit(); }} + slots={slots} slotProps={{ SuccessScreen: { icon: , @@ -164,6 +167,7 @@ export const ChangePasswordDialog: React.FC = (props) onFinish(); }, }, + ...slotProps.SuccessScreen, }, }} showSuccessScreen={showSuccessScreen} From 3cfb1ec98b681911044ae0ee0eef59227cacd8af Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Wed, 27 Sep 2023 12:05:23 +0530 Subject: [PATCH 3/4] Remove Test code --- .../example/src/components/ChangePassword.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/login-workflow/example/src/components/ChangePassword.tsx b/login-workflow/example/src/components/ChangePassword.tsx index c939af86..1aa51d56 100644 --- a/login-workflow/example/src/components/ChangePassword.tsx +++ b/login-workflow/example/src/components/ChangePassword.tsx @@ -22,21 +22,6 @@ export const ChangePassword = (): JSX.Element => { onPrevious={(): void => app.setShowChangePasswordDialog(false)} onSubmit={(): void => app.setShowChangePasswordDialog(false)} onFinish={(): void => logOut()} - slots={{ - SuccessScreen: (props): JSX.Element => ( - - {props?.icon} - {props?.messageTitle} - - ), - }} - slotProps={{ - SuccessScreen: { - icon: , - messageTitle: 'Yeah', - message: 'ee', - }, - }} /> ); }; From b76f416d06f8fc12d47836f221010e5b57a0f97e Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Wed, 27 Sep 2023 13:17:53 +0530 Subject: [PATCH 4/4] Remove unused import --- login-workflow/example/src/components/ChangePassword.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/login-workflow/example/src/components/ChangePassword.tsx b/login-workflow/example/src/components/ChangePassword.tsx index 1aa51d56..ea145a38 100644 --- a/login-workflow/example/src/components/ChangePassword.tsx +++ b/login-workflow/example/src/components/ChangePassword.tsx @@ -3,8 +3,6 @@ import { ChangePasswordDialog } from '@brightlayer-ui/react-auth-workflow'; import { useApp } from '../contexts/AppContextProvider'; import { LocalStorage } from '../store/local-storage'; import { useNavigate } from 'react-router-dom'; -import { Box } from '@mui/material'; -import { Alarm } from '@mui/icons-material'; export const ChangePassword = (): JSX.Element => { const app = useApp();