Use this library if you have a small problem with the font size 🎉
yarn add react-native-responsive-fontsize
# or
npm install react-native-responsive-fontsize --save
iPhone SE | iPhone X |
---|---|
import { RFPercentage, RFValue } from "react-native-responsive-fontsize";
const styles = StyleSheet.create({
welcome: {
fontSize: RFValue(24),
textAlign: "center",
margin: 10,
},
instructions: {
textAlign: "center",
color: "#333333",
marginBottom: 5,
fontSize: RFPercentage(5),
},
});
- support landscape mode
- make
test code