-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ReportActionItemIOUQuote component
- Loading branch information
1 parent
b04df47
commit 6870e69
Showing
4 changed files
with
34 additions
and
15 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import PropTypes from 'prop-types'; | ||
import _ from 'underscore'; | ||
import styles from '../styles/styles'; | ||
import ReportActionPropTypes from '../pages/home/report/ReportActionPropTypes'; | ||
import RenderHTML from './RenderHTML'; | ||
|
||
const propTypes = { | ||
// All the data of the action | ||
action: PropTypes.shape(ReportActionPropTypes).isRequired, | ||
|
||
}; | ||
const ReportActionItemIOUQuote = ({action}) => ( | ||
<View style={[styles.chatItemMessage]}> | ||
{_.map(_.compact(action.message), (fragment, index) => { | ||
const viewDetails = '<br /><a href="#" style="text-decoration:none;">View Details</a>'; | ||
const html = `<blockquote>${fragment.text}${viewDetails}</blockquote>`; | ||
return ( | ||
<RenderHTML key={`iouQuote-${action.sequenceNumber}-${index}`} html={html} debug={false} /> | ||
); | ||
})} | ||
</View> | ||
|
||
); | ||
|
||
ReportActionItemIOUQuote.propTypes = propTypes; | ||
ReportActionItemIOUQuote.displayName = 'ReportActionItemIOUQuote'; | ||
|
||
export default ReportActionItemIOUQuote; |
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