Skip to content

Commit

Permalink
fix: changed the name of the Modal ClickAway in Group Info and User P…
Browse files Browse the repository at this point in the history
…rofile
  • Loading branch information
abhishek-01k committed Jun 24, 2024
1 parent 0a9606a commit adde0f0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface IChatProfileUserInfo {
// Exported Functions
export const ChatProfile: React.FC<IChatProfile> = ({
chatId,
closeModalOnClickAway,
closeGroupInfoModalOnClickAway,
groupInfoModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
groupInfoModalPositionType = MODAL_POSITION_TYPE.GLOBAL,
chatProfileRightHelperComponent = null,
Expand Down Expand Up @@ -333,7 +333,7 @@ export const ChatProfile: React.FC<IChatProfile> = ({
<GroupInfoModal
theme={theme}
setModal={setModal}
closeModalOnClickAway={closeModalOnClickAway}
closeModalOnClickAway={closeGroupInfoModalOnClickAway}
groupInfo={initialized.groupInfo!}
chatProfileInfo={initialized.profile}
setGroupInfo={(mutatedGroupInfo) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (options: IC
chatProfileRightHelperComponent = null,
chatProfileLeftHelperComponent = null,
welcomeComponent = null,
closeModalOnClickAway = false
closeGroupInfoModalOnClickAway = false
} = options || {};

const { user } = useChatData();
Expand Down Expand Up @@ -110,7 +110,7 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (options: IC
>
<ChatProfile
key={chatId}
closeModalOnClickAway={closeModalOnClickAway}
closeGroupInfoModalOnClickAway={closeGroupInfoModalOnClickAway}
chatProfileRightHelperComponent={chatProfileRightHelperComponent}
chatProfileLeftHelperComponent={chatProfileLeftHelperComponent}
chatId={initialized.derivedChatId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type UpdateUserProfileModalProps = {
userProfile: IUser;
setUserProfile: React.Dispatch<React.SetStateAction<IUser | undefined>>;
setModal: React.Dispatch<React.SetStateAction<boolean>>;
closeModalOnClickAway?: boolean;
closeProfileModalOnClickAway?: boolean;
updateUserProfileModalBackground?: ModalBackgroundType;
updateUserProfileModalPositionType?: ModalPositionType;
};
Expand All @@ -34,7 +34,7 @@ export interface UserProfileType {
export const UpdateUserProfileModal = ({
theme,
setModal,
closeModalOnClickAway,
closeProfileModalOnClickAway,
userProfile,
setUserProfile,
updateUserProfileModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
Expand Down Expand Up @@ -164,7 +164,7 @@ export const UpdateUserProfileModal = ({
return (
<Modal
onClose={onClose}
closeonClickAway={closeModalOnClickAway}
closeonClickAway={closeProfileModalOnClickAway}
modalBackground={updateUserProfileModalBackground}
modalPositionType={updateUserProfileModalPositionType}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const UserProfile: React.FC<UserProfileProps> = ({
updateUserProfileModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
updateUserProfileModalPositionType = MODAL_POSITION_TYPE.GLOBAL,
onUserProfileUpdateModalOpen,
closeModalOnClickAway = false
closeProfileModalOnClickAway = false
}) => {
const { user } = useChatData();
const [userProfile, setUserProfile] = useState<IUser>();
Expand Down Expand Up @@ -144,7 +144,7 @@ export const UserProfile: React.FC<UserProfileProps> = ({
<UpdateUserProfileModal
theme={theme}
setModal={setShowUpdateUserProfileModal}
closeModalOnClickAway={closeModalOnClickAway}
closeProfileModalOnClickAway={closeProfileModalOnClickAway}
userProfile={userProfile!}
setUserProfile={setUserProfile}
updateUserProfileModalBackground={updateUserProfileModalBackground}
Expand Down
6 changes: 3 additions & 3 deletions packages/uiweb/src/lib/components/chat/exportedTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ export interface IChatViewComponentProps {
chatProfileRightHelperComponent?: React.ReactNode;
chatProfileLeftHelperComponent?: React.ReactNode;
welcomeComponent?: React.ReactNode;
closeModalOnClickAway?: boolean;
closeGroupInfoModalOnClickAway?: boolean;
}

export interface IChatProfile {
chatId: string;
closeModalOnClickAway?: boolean;
closeGroupInfoModalOnClickAway?: boolean;
groupInfoModalBackground?: ModalBackgroundType;
groupInfoModalPositionType?: ModalPositionType;
chatProfileRightHelperComponent?: React.ReactNode;
Expand Down Expand Up @@ -184,7 +184,7 @@ export interface UserProfileProps {
updateUserProfileModalBackground?: ModalBackgroundType;
updateUserProfileModalPositionType?: ModalPositionType;
onUserProfileUpdateModalOpen?: (open: boolean) => void;
closeModalOnClickAway?: boolean;
closeProfileModalOnClickAway?: boolean;
}

export interface ModalButtonProps {
Expand Down

0 comments on commit adde0f0

Please sign in to comment.