Skip to content

Instantly share code, notes, and snippets.

@samueljmurray
Created August 30, 2017 15:40
Show Gist options
  • Save samueljmurray/7b3efdd6de15942900b8ee2f1561bc54 to your computer and use it in GitHub Desktop.
Save samueljmurray/7b3efdd6de15942900b8ee2f1561bc54 to your computer and use it in GitHub Desktop.
Screen size ternary
const extraSmallScreen = Dimensions.get("window").height < 568;
const smallScreen = Dimensions.get("window").height < 667;
{
marginHorizontal: extraSmallScreen ? 8 : 16,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment