-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29201 from Expensify/georgia-cardTransactions-Mon…
…eyRequestView [Wave 8 - ECard Transactions] Update Money Request View Fields to support Ecard transactions
- Loading branch information
Showing
7 changed files
with
114 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,35 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import PropTypes from 'prop-types'; | ||
import styles from '../styles/styles'; | ||
import useLocalize from '../hooks/useLocalize'; | ||
import Text from './Text'; | ||
|
||
function MoneyRequestHeaderStatusBar() { | ||
const {translate} = useLocalize(); | ||
const propTypes = { | ||
/** Title displayed in badge */ | ||
title: PropTypes.string.isRequired, | ||
|
||
/** Banner Description */ | ||
description: PropTypes.string.isRequired, | ||
|
||
/** Whether we show the border bottom */ | ||
shouldShowBorderBottom: PropTypes.bool.isRequired, | ||
}; | ||
|
||
function MoneyRequestHeaderStatusBar({title, description, shouldShowBorderBottom}) { | ||
const borderBottomStyle = shouldShowBorderBottom ? styles.borderBottom : {}; | ||
return ( | ||
<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.overflowHidden, styles.ph5, styles.pb3, styles.borderBottom, styles.w100]}> | ||
<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.flexGrow1, styles.overflowHidden, styles.ph5, styles.pb3, borderBottomStyle]}> | ||
<View style={[styles.moneyRequestHeaderStatusBarBadge]}> | ||
<Text style={[styles.textStrong, styles.textLabel]}>{translate('iou.receiptStatusTitle')}</Text> | ||
<Text style={[styles.textStrong, styles.textLabel]}>{title}</Text> | ||
</View> | ||
<View style={[styles.flexShrink1]}> | ||
<Text style={[styles.textLabelSupporting]}>{translate('iou.receiptStatusText')}</Text> | ||
<Text style={[styles.textLabelSupporting]}>{description}</Text> | ||
</View> | ||
</View> | ||
); | ||
} | ||
|
||
MoneyRequestHeaderStatusBar.displayName = 'MoneyRequestHeaderStatusBar'; | ||
MoneyRequestHeaderStatusBar.propTypes = propTypes; | ||
|
||
export default MoneyRequestHeaderStatusBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters