Skip to content

Commit

Permalink
chore: add horizontal scroll to form gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
hopetambala committed Oct 2, 2020
1 parent 3e59f97 commit 50373da
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Here are some quick npm commands to get started:
## Resources

- [React Native Paper](https://callstack.github.io/react-native-paper/index.html)
- [Material Icons](https://materialdesignicons.com/)
- [Native Base](https://docs.nativebase.io/)
- [Expo](https://docs.expo.io/versions/latest/)
- [Understanding Flexbox](https://yogalayout.com/playground)
Expand Down
20 changes: 13 additions & 7 deletions domains/DataCollection/FormGallery/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import {
View,
StyleSheet
View, StyleSheet, ScrollView
} from 'react-native';
import {
Text, Button, Title, Paragraph, Card
Expand All @@ -14,12 +13,12 @@ import ComingSoonSVG from '../../../assets/graphics/static/Adventurer.svg'
const FormGallery = ({ setDataCollectionView }) => {
return (
<View>
<Button onPress={() => { setDataCollectionView('Root') }}>
<Text>Back to Home</Text>
<Button icon="arrow-left" width={100} onPress={() => { setDataCollectionView('Root') }}>
<Text>Back</Text>
</Button>
<View style={layout.screenRow}>
<Text>Puente Forms</Text>
<View style={layout.screenFlexRow}>
<ScrollView horizontal>
<Card style={screenLayout.card}>
<Text>Env Health</Text>
</Card>
Expand All @@ -29,7 +28,13 @@ const FormGallery = ({ setDataCollectionView }) => {
<Card style={screenLayout.card}>
<Text>Vitals</Text>
</Card>
</View>
<Card style={screenLayout.card}>
<Text>Vitals</Text>
</Card>
<Card style={screenLayout.card}>
<Text>Vitals</Text>
</Card>
</ScrollView>
</View>
<View style={layout.screenRow}>
<Text>Custom Forms</Text>
Expand Down Expand Up @@ -59,7 +64,8 @@ const screenLayout = StyleSheet.create({
width: 90,
justifyContent: 'center',
alignItems: 'center',
marginHorizontal: 5
marginHorizontal: 5,
marginVertical: 5
}

})
Expand Down

0 comments on commit 50373da

Please sign in to comment.