Skip to content

Commit 1447a00

Browse files
authored
Fix style inheritance from parent
1 parent 228a893 commit 1447a00

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ParsedText.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ 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
<ReactNative.Text
6769
key={`parsedText-${index}`}
70+
style={[parentStyle, style]}
6871
{...this.props.childrenProps}
6972
{...props}
7073
/>

0 commit comments

Comments
 (0)