This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* MyComponent.js */ | |
import HeadingText from "HeadingText"; | |
class MyComponent extends React.Component { | |
render() { | |
return ( | |
<View> | |
<HeadingText>Article heading</HeadingText> | |
<Text>Article body...</Text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
marginHorizontal: screenSize({xs: 8, s: 12}, 16) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Dimensions } from "react-native"; | |
// Height | |
const screenSizes = [ | |
{ | |
name: "xs", | |
height: 568 | |
}, | |
{ | |
name: "s", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
marginHorizontal: extraSmallScreen ? 8 : (smallScreen ? 12 : 16); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const extraSmallScreen = Dimensions.get("window").height < 568; | |
const smallScreen = Dimensions.get("window").height < 667; | |
{ | |
marginHorizontal: extraSmallScreen ? 8 : 16, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* MyComponent.js */ | |
import s from "styles"; | |
class MyComponent extends React.Component { | |
render() { | |
return ( | |
<View style={[s.flex1, s.ma1, s.bg_gray_blue]}> | |
<Text style={[s.teal, s.o_90]}> | |
Hi. |
NewerOlder