diff --git a/src/components/DotIndicatorMessage.js b/src/components/DotIndicatorMessage.js index 26e42c0b9ec7..26e01f0eee8a 100644 --- a/src/components/DotIndicatorMessage.js +++ b/src/components/DotIndicatorMessage.js @@ -5,6 +5,7 @@ import _ from 'underscore'; import * as Localize from '@libs/Localize'; import stylePropTypes from '@styles/stylePropTypes'; import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; import themeColors from '@styles/themes/default'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; @@ -57,19 +58,21 @@ function DotIndicatorMessage(props) { .map((message) => Localize.translateIfPhraseKey(message)) .value(); + const isErrorMessage = props.type === 'error'; + return ( {_.map(sortedMessages, (message, i) => ( {message} diff --git a/src/components/LocationErrorMessage/BaseLocationErrorMessage.js b/src/components/LocationErrorMessage/BaseLocationErrorMessage.js index 786588993cd8..b5114acaa36b 100644 --- a/src/components/LocationErrorMessage/BaseLocationErrorMessage.js +++ b/src/components/LocationErrorMessage/BaseLocationErrorMessage.js @@ -10,6 +10,7 @@ import Tooltip from '@components/Tooltip'; import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; import colors from '@styles/colors'; import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; import CONST from '@src/CONST'; import * as locationErrorMessagePropTypes from './locationErrorMessagePropTypes'; @@ -42,14 +43,14 @@ function BaseLocationErrorMessage({onClose, onAllowLocationLinkPress, locationEr {isPermissionDenied ? ( - {`${translate('location.permissionDenied')} ${translate('location.please')}`} + {`${translate('location.permissionDenied')} ${translate('location.please')}`} {` ${translate('location.allowPermission')} `} - {translate('location.tryAgain')} + {translate('location.tryAgain')} ) : ( {translate('location.notFound')} diff --git a/src/styles/StyleUtils.ts b/src/styles/StyleUtils.ts index f58d2c9a236d..faece4f44335 100644 --- a/src/styles/StyleUtils.ts +++ b/src/styles/StyleUtils.ts @@ -1316,6 +1316,13 @@ function getTransparentColor(color: string) { return `${color}00`; } +/** + * Get the styles of the text next to dot indicators + */ +function getDotIndicatorTextStyles(isErrorText = true): TextStyle { + return isErrorText ? {...styles.offlineFeedback.text, color: styles.formError.color} : {...styles.offlineFeedback.text}; +} + export { combineStyles, displayIfTrue, @@ -1361,6 +1368,7 @@ export { getDirectionStyle, getDisabledLinkStyles, getDropDownButtonHeight, + getDotIndicatorTextStyles, getEmojiPickerListHeight, getEmojiPickerStyle, getEmojiReactionBubbleStyle,