diff --git a/src/components/ContextMenuItem.tsx b/src/components/ContextMenuItem.tsx index d292f80d135e..d6c8fd973983 100644 --- a/src/components/ContextMenuItem.tsx +++ b/src/components/ContextMenuItem.tsx @@ -1,6 +1,6 @@ import type {ForwardedRef} from 'react'; import React, {forwardRef, useImperativeHandle} from 'react'; -import type {GestureResponderEvent} from 'react-native'; +import type {GestureResponderEvent, StyleProp, ViewStyle} from 'react-native'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; import useThrottledButtonState from '@hooks/useThrottledButtonState'; @@ -41,6 +41,9 @@ type ContextMenuItemProps = { /** Whether the width should be limited */ shouldLimitWidth?: boolean; + + /** Styles to apply to ManuItem wrapper */ + wrapperStyle?: StyleProp; }; type ContextMenuItemHandle = { @@ -48,7 +51,19 @@ type ContextMenuItemHandle = { }; function ContextMenuItem( - {onPress, successIcon, successText = '', icon, text, isMini = false, description = '', isAnonymousAction = false, isFocused = false, shouldLimitWidth = true}: ContextMenuItemProps, + { + onPress, + successIcon, + successText = '', + icon, + text, + isMini = false, + description = '', + isAnonymousAction = false, + isFocused = false, + shouldLimitWidth = true, + wrapperStyle, + }: ContextMenuItemProps, ref: ForwardedRef, ) { const styles = useThemeStyles(); @@ -93,7 +108,7 @@ function ContextMenuItem( title={itemText} icon={itemIcon} onPress={triggerPressAndUpdateSuccess} - wrapperStyle={styles.pr9} + wrapperStyle={[styles.pr9, wrapperStyle]} success={!isThrottledButtonActive} description={description} descriptionTextStyle={styles.breakWord} diff --git a/src/languages/en.ts b/src/languages/en.ts index 0781bb6b19f3..847576d0d134 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -722,6 +722,10 @@ export default { subtitle: 'These details are used for travel and payments. They are never shown on your public profile.', }, }, + shareCodePage: { + title: 'Your code', + subtitle: 'Invite members to Expensify by sharing your personal QR code or referral link.', + }, loungeAccessPage: { loungeAccess: 'Lounge access', headline: 'The Expensify Lounge is closed.', @@ -1984,7 +1988,7 @@ export default { parentNavigationSummary: ({rootReportName, workspaceName}: ParentNavigationSummaryParams) => `From ${rootReportName}${workspaceName ? ` in ${workspaceName}` : ''}`, }, qrCodes: { - copy: 'Copy', + copy: 'Copy URL', copied: 'Copied!', }, moderation: { diff --git a/src/languages/es.ts b/src/languages/es.ts index f31bc4c367fc..665fdf570f6e 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -716,6 +716,10 @@ export default { subtitle: 'Estos detalles se utilizan para viajes y pagos. Nunca se mostrarán en tu perfil público.', }, }, + shareCodePage: { + title: 'Tu código', + subtitle: 'Invita a miembros a Expensify compartiendo tu código QR personal o enlace de invitación.', + }, loungeAccessPage: { loungeAccess: 'Acceso a la sala vip', headline: 'La sala vip de Expensify está cerrada.', @@ -2470,7 +2474,7 @@ export default { parentNavigationSummary: ({rootReportName, workspaceName}: ParentNavigationSummaryParams) => `De ${rootReportName}${workspaceName ? ` en ${workspaceName}` : ''}`, }, qrCodes: { - copy: 'Copiar', + copy: 'Copiar URL', copied: '¡Copiado!', }, actionableMentionWhisperOptions: { diff --git a/src/pages/ShareCodePage.tsx b/src/pages/ShareCodePage.tsx index 9ed8bf3d76a1..b3a4f37b9820 100644 --- a/src/pages/ShareCodePage.tsx +++ b/src/pages/ShareCodePage.tsx @@ -11,6 +11,7 @@ import MenuItem from '@components/MenuItem'; import QRShareWithDownload from '@components/QRShare/QRShareWithDownload'; import type QRShareWithDownloadHandle from '@components/QRShare/QRShareWithDownload/types'; import ScreenWrapper from '@components/ScreenWrapper'; +import Section from '@components/Section'; import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails'; import type {WithCurrentUserPersonalDetailsProps} from '@components/withCurrentUserPersonalDetails'; import useEnvironment from '@hooks/useEnvironment'; @@ -82,45 +83,60 @@ function ShareCodePage({report, session, currentUserPersonalDetails}: ShareCodeP shouldShowBackButton={isReport || isSmallScreenWidth} icon={Illustrations.QrCode} /> - - - - + + +
+ + + - - Clipboard.setString(url)} - shouldLimitWidth={false} - /> + + Clipboard.setString(url)} + shouldLimitWidth={false} + wrapperStyle={themeStyles.sectionMenuItemTopDescription} + /> - {isNative && ( - qrCodeRef.current?.download?.()} - /> - )} + {isNative && ( + qrCodeRef.current?.download?.()} + wrapperStyle={themeStyles.sectionMenuItemTopDescription} + /> + )} - Navigation.navigate(ROUTES.REFERRAL_DETAILS_MODAL.getRoute(CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SHARE_CODE))} - /> + Navigation.navigate(ROUTES.REFERRAL_DETAILS_MODAL.getRoute(CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SHARE_CODE))} + wrapperStyle={themeStyles.sectionMenuItemTopDescription} + shouldShowRightIcon + /> + +
diff --git a/src/pages/settings/Profile/ProfilePage.js b/src/pages/settings/Profile/ProfilePage.js index 34ad1e2d4c8e..c356fb527968 100755 --- a/src/pages/settings/Profile/ProfilePage.js +++ b/src/pages/settings/Profile/ProfilePage.js @@ -167,7 +167,7 @@ function ProfilePage(props) { shouldShowBackButton={props.isSmallScreenWidth} icon={Illustrations.Profile} /> - +
alignItems: 'center', }, + qrShareSection: { + width: 264, + }, + sectionMenuItemTopDescription: { ...spacing.ph8, ...spacing.mhn8,