react native responsive fontSize
v0.5.1

Gunakan pustaka ini jika Anda memiliki masalah kecil dengan ukuran font?
yarn add react-native-responsive-fontsize
# or
npm install react-native-responsive-fontsize --save| iPhone SE | iPhone X. |
|---|---|
| argumen | Keterangan | |
|---|---|---|
| Rfpercentage | Persen: Angka | Ukuran font dihitung sebagai persentase ketinggian ( width dalam mode lansekap) perangkat. |
| Rfvalue | Nilai: Nomor, StandardscreenHeight?: Nomor | Ukuran font dihitung berdasarkan standar standar dan nilai lulus |
standardScreenHeight RFValue680screen width import { RFPercentage , RFValue } from "react-native-responsive-fontsize" ;
const styles = StyleSheet . create ( {
welcome : {
fontSize : RFValue ( 24 , 580 ) // second argument is standardScreenHeight(optional),
textAlign : "center" ,
margin : 10 ,
} ,
instructions : {
textAlign : "center" ,
color : "#333333" ,
marginBottom : 5 ,
fontSize : RFPercentage ( 5 ) ,
} ,
} ) ; pelepasan
test code