From 3e72bfa56c860826429a842f6c128d78d4a930db Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 1 Jun 2017 19:47:08 -0400 Subject: react-native-web port of fmf app --- client/src/lib/components/scrollableContainer.js | 51 ++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 client/src/lib/components/scrollableContainer.js (limited to 'client/src/lib/components/scrollableContainer.js') diff --git a/client/src/lib/components/scrollableContainer.js b/client/src/lib/components/scrollableContainer.js new file mode 100644 index 0000000..b0beb63 --- /dev/null +++ b/client/src/lib/components/scrollableContainer.js @@ -0,0 +1,51 @@ +import React, { Component } from 'react'; +import { + StyleSheet, + View, + ScrollView +} from 'react-native'; + +import Heading from '../components/heading' + +export default class ScrollableContainer extends Component { + constructor(props) { + super() + } + render() { + const { heading, bodyStyle, headingOnPress, ...props } = this.props + let headingEl; + if (heading) { + headingEl = ( + + {heading.toUpperCase()} + + ) + } + else { + headingEl = null + } + return ( + + this.scrollView = ref} contentContainerStyle={[styles.body, bodyStyle]}> + {headingEl} + {this.props.children} +
footer
+
+
+ ) + } +} + +const styles = StyleSheet.create({ + container: { + width: '100vw', + flex: 1, + justifyContent: 'flex-start', + }, + heading: { + }, + body: { + alignItems: 'center', + }, +}) + -- cgit v1.2.3-70-g09d2