Skip to content

Instantly share code, notes, and snippets.

@alexkuttig
Last active March 24, 2018 14:09
Show Gist options
  • Save alexkuttig/e505c914e8649bffb38337aa28ce1607 to your computer and use it in GitHub Desktop.
Save alexkuttig/e505c914e8649bffb38337aa28ce1607 to your computer and use it in GitHub Desktop.
import {
statusBarHeight,
headerHeight,
SafeAreaWithHeader,
} from './DimensionsHelper';
const vw: number = SafeAreaWithHeader.vw;
const vh: number = SafeAreaWithHeader.vh;
class ViewWithTitle extends Component {
render() {
return (
<View style={styles.outerContainer}>
/*
title stuff here
*/
{
this.renderIOSBigTitle()
}
<View style={[styles.titleContainer, {height: this.headerHeight}]}>
{
this.renderTitleArea()
}
</View>
<View style={[styles.innerContainer, {height: 100 * vh}]}>
/*
content stuff here
*/
{
this.renderContentArea()
}
{
this.renderContentAreaList()
}
</View>
</View>
);
}
}
const styles: StyleSheet = StyleSheet.create({
outerContainer: {
width: 100 * vw,
backgroundColor: '#ffffff',
},
innerContainer: {
position: 'relative',
width: 100 * vw,
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment