Last active
September 12, 2018 15:54
-
-
Save estevaolucas/70f94061a80627a801c8ba46fa979bc2 to your computer and use it in GitHub Desktop.
Simulate React-Native fontScale change
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 { Slider, NativeModules } from 'react-native'; | |
<Slider | |
maximumValue={ 2 } | |
minimumValue={ 1 } | |
onValueChange={ (value) => { | |
NativeModules.AccessibilityManager.setAccessibilityContentSizeMultipliers({ | |
extraSmall: value, | |
small: value, | |
medium: value, | |
large: value, | |
}); | |
} } | |
step={ 1.5 } /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment