diff --git a/src/components/Text/__tests__/__snapshots__/index-test.js.snap b/src/components/Text/__tests__/__snapshots__/index-test.js.snap index bec091a4..c4ef51f8 100644 --- a/src/components/Text/__tests__/__snapshots__/index-test.js.snap +++ b/src/components/Text/__tests__/__snapshots__/index-test.js.snap @@ -2,7 +2,7 @@ exports[`components/Text prop "onPress" 1`] = `
`; exports[`components/Text prop "selectable" 2`] = `
`; diff --git a/src/components/Text/index.js b/src/components/Text/index.js index be5be73d..e08bf550 100644 --- a/src/components/Text/index.js +++ b/src/components/Text/index.js @@ -66,7 +66,7 @@ class Text extends Component { otherProps.dir = dir !== undefined ? dir : 'auto'; otherProps.style = [ styles.initial, - this.context.isInAParentText !== true && styles.preserveWhitespace, + this.context.isInAParentText === true && styles.isInAParentText, style, selectable === false && styles.notSelectable, numberOfLines === 1 && styles.singleLineStyle, @@ -94,13 +94,19 @@ const styles = StyleSheet.create({ color: 'inherit', display: 'inline', font: 'inherit', + fontFamily: 'System', + fontSize: 14, margin: 0, padding: 0, textDecorationLine: 'none', + whiteSpace: 'pre-wrap', wordWrap: 'break-word' }, - preserveWhitespace: { - whiteSpace: 'pre-wrap' + isInAParentText: { + // inherit parent font styles + fontFamily: 'inherit', + fontSize: 'inherit', + whiteSpace: 'inherit' }, notSelectable: { userSelect: 'none'