Skip to content

Instantly share code, notes, and snippets.

@nirsky
Created July 24, 2017 10:20
Show Gist options
  • Save nirsky/46e261012fecd4f4a7e8cc9eb5ee6f7a to your computer and use it in GitHub Desktop.
Save nirsky/46e261012fecd4f4a7e8cc9eb5ee6f7a to your computer and use it in GitHub Desktop.
import { scale, moderateScale, verticalScale} from './scaling';
const styles = StyleSheet.create({
...
box: {
width: moderateScale(300),
height: verticalScale(450),
padding: scale(10),
...
},
title: {
fontSize: moderateScale(20, 0.4),
marginBottom: scale(10),
...
},
text: {
fontSize: moderateScale(14),
...
},
button: {
width: moderateScale(150, 0.3),
height: moderateScale(45, 0.3),
marginBottom: moderateScale(10),
...
},
buttonText: {
fontSize: moderateScale(14),
...
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment