react native responsive fontSize
v0.5.1

Verwenden Sie diese Bibliothek, wenn Sie ein kleines Problem mit der Schriftgröße haben?
yarn add react-native-responsive-fontsize
# or
npm install react-native-responsive-fontsize --save| iPhone SE | iPhone x |
|---|---|
| Argumente | Beschreibung | |
|---|---|---|
| Rfpercentage | Prozent: Zahl | Die Schriftgröße wird als Prozentsatz der Höhe ( width im Landschaftsmodus) des Geräts berechnet. |
| Rfvalue | Wert: Nummer, StandardsCreenHeight ?: Nummer | Die Schriftgröße wird basierend auf StandardsCreenHeight und dem übergebenen Wert berechnet |
standardScreenHeight von 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 ) ,
} ,
} ) ; Veröffentlichungen
test code erstellen