Skip to content

Commit ed08d9a

Browse files
authored
Merge pull request #53 from magrinj/master
Fix style inheritance from parent
2 parents 24ad5c0 + c68f080 commit ed08d9a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ParsedText.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,14 @@ class ParsedText extends React.Component {
6262
const textExtraction = new TextExtraction(this.props.children, this.getPatterns());
6363

6464
return textExtraction.parse().map((props, index) => {
65+
const { style: parentStyle } = this.props
66+
const { style, ...remainder } = props
6567
return (
6668
<Text
6769
key={`parsedText-${index}`}
70+
style={[parentStyle, style]}
6871
{...this.props.childrenProps}
69-
{...props}
72+
{...remainder}
7073
/>
7174
);
7275
});

0 commit comments

Comments
 (0)