Permalink
Browse files

Merge pull request #612 from dlahish/patch-1

Add childrenProps to ParsedText
  • Loading branch information...
brunocascio committed Oct 28, 2017
2 parents b2be2b5 + ed7805a commit fae9fcf954809beeb0faa9a71b7f7bc4f10ef471
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/MessageText.js
View
@@ -69,13 +69,14 @@ export default class MessageText extends React.Component {
return (
<View style={[styles[this.props.position].container, this.props.containerStyle[this.props.position]]}>
<ParsedText
style={[styles[this.props.position].text, this.props.textStyle[this.props.position]]}
style={[styles[this.props.position].text, this.props.textStyle[this.props.position], this.props.customTextStyle]}
parse={[
...this.props.parsePatterns(linkStyle),
{type: 'url', style: linkStyle, onPress: this.onUrlPress},
{type: 'phone', style: linkStyle, onPress: this.onPhonePress},
{type: 'email', style: linkStyle, onPress: this.onEmailPress},
]}
childrenProps={{...this.props.textProps}}
>
{this.props.currentMessage.text}
</ParsedText>
@@ -151,4 +152,6 @@ MessageText.propTypes = {
right: Text.propTypes.style,
}),
parsePatterns: PropTypes.func,
textProps: PropTypes.object,
customTextStyle: Text.propTypes.style,
};

0 comments on commit fae9fcf

Please sign in to comment.