Created
November 27, 2019 12:58
-
-
Save wwiechorek/944f886d316114d80742a42308fa5e2c to your computer and use it in GitHub Desktop.
Mudar fonte padrão de um projeto React-native
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
import { Text } from 'react-native' | |
let oldText = Text.render; | |
Text.render = function (...args) { | |
let origin = oldText.call(this, ...args); | |
return React.cloneElement(origin, { | |
style: [{fontFamily: 'Open Sans'}, origin.props.style] | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment