diff --git a/src/components/CurrentWalletBalance.js b/src/components/CurrentWalletBalance.js index 9d4e18dfe4a9..c894466668fe 100644 --- a/src/components/CurrentWalletBalance.js +++ b/src/components/CurrentWalletBalance.js @@ -1,6 +1,5 @@ import React from 'react'; -// eslint-disable-next-line no-restricted-imports -import {ActivityIndicator, Text} from 'react-native'; +import {ActivityIndicator} from 'react-native'; import PropTypes from 'prop-types'; import _ from 'underscore'; import {withOnyx} from 'react-native-onyx'; @@ -9,6 +8,7 @@ import withLocalize, {withLocalizePropTypes} from './withLocalize'; import compose from '../libs/compose'; import themeColors from '../styles/themes/default'; import ONYXKEYS from '../ONYXKEYS'; +import ExpensifyText from './ExpensifyText'; const propTypes = { /** The user's wallet account */ @@ -40,11 +40,11 @@ const CurrentWalletBalance = (props) => { {style: 'currency', currency: 'USD'}, ); return ( - {`${formattedBalance}`} - + ); }; diff --git a/src/components/ExpensiPicker.js b/src/components/ExpensiPicker.js index 4a6f4fc69649..54473163ea27 100644 --- a/src/components/ExpensiPicker.js +++ b/src/components/ExpensiPicker.js @@ -1,9 +1,9 @@ import _ from 'underscore'; import React, {PureComponent} from 'react'; -// eslint-disable-next-line no-restricted-imports -import {Text, View} from 'react-native'; +import {View} from 'react-native'; import PropTypes from 'prop-types'; import Picker from './Picker'; +import ExpensifyText from './ExpensifyText'; import styles from '../styles/styles'; import InlineErrorText from './InlineErrorText'; @@ -47,7 +47,7 @@ class ExpensiPicker extends PureComponent { ]} > {this.props.label && ( - {this.props.label} + {this.props.label} )} this.setState({isOpen: true})} diff --git a/src/components/InlineCodeBlock/index.js b/src/components/InlineCodeBlock/index.js index d83a716880cb..12a062c45a04 100644 --- a/src/components/InlineCodeBlock/index.js +++ b/src/components/InlineCodeBlock/index.js @@ -1,7 +1,6 @@ import React from 'react'; -// eslint-disable-next-line no-restricted-imports -import {Text} from 'react-native'; import inlineCodeBlockPropTypes from './inlineCodeBlockPropTypes'; +import ExpensifyText from '../ExpensifyText'; const InlineCodeBlock = (props) => { const TDefaultRenderer = props.TDefaultRenderer; @@ -10,11 +9,11 @@ const InlineCodeBlock = (props) => { // eslint-disable-next-line react/jsx-props-no-spreading {...props.defaultRendererProps} > - {props.defaultRendererProps.tnode.data} - + ); }; diff --git a/src/components/PressableWithSecondaryInteraction/index.android.js b/src/components/PressableWithSecondaryInteraction/index.android.js index ea7bb114d56d..9cdfa65f8db1 100644 --- a/src/components/PressableWithSecondaryInteraction/index.android.js +++ b/src/components/PressableWithSecondaryInteraction/index.android.js @@ -1,9 +1,9 @@ import _ from 'underscore'; import React, {forwardRef} from 'react'; import ReactNativeHapticFeedback from 'react-native-haptic-feedback'; -// eslint-disable-next-line no-restricted-imports -import {Pressable, Platform, Text as RNText} from 'react-native'; +import {Pressable, Platform} from 'react-native'; import * as pressableWithSecondaryInteractionPropTypes from './pressableWithSecondaryInteractionPropTypes'; +import ExpensifyText from '../ExpensifyText'; /** * Triggers haptic feedback, and calls onSecondaryInteraction @@ -34,7 +34,7 @@ function handleLongPress(event, props) { */ const PressableWithSecondaryInteraction = (props) => { // Use Text node for inline mode to prevent content overflow. - const Node = props.inline ? RNText : Pressable; + const Node = props.inline ? ExpensifyText : Pressable; return ( { // Use Text node for inline mode to prevent content overflow. - const Node = props.inline ? RNText : Pressable; + const Node = props.inline ? ExpensifyText : Pressable; return ( ( - + )} shouldRemoveRightBorderRadius diff --git a/src/pages/settings/Payments/PaymentMethodList.js b/src/pages/settings/Payments/PaymentMethodList.js index db559f52d2a6..15f6548a9cef 100644 --- a/src/pages/settings/Payments/PaymentMethodList.js +++ b/src/pages/settings/Payments/PaymentMethodList.js @@ -1,13 +1,13 @@ import _ from 'underscore'; import React, {Component} from 'react'; import PropTypes from 'prop-types'; -// eslint-disable-next-line no-restricted-imports -import {FlatList, Text} from 'react-native'; +import {FlatList} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import lodashGet from 'lodash/get'; import styles from '../../../styles/styles'; import * as StyleUtils from '../../../styles/StyleUtils'; import MenuItem from '../../../components/MenuItem'; +import ExpensifyText from '../../../components/ExpensifyText'; import compose from '../../../libs/compose'; import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; import ONYXKEYS from '../../../ONYXKEYS'; @@ -173,11 +173,11 @@ class PaymentMethodList extends Component { } return ( - {item.text} - + ); }