Skip to content

Commit

Permalink
changed events styling to be scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
cShingleton committed Sep 21, 2017
1 parent e03875d commit 4534b02
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
24 changes: 17 additions & 7 deletions js/scenes/Event/Event.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import {
Text,
Image,
TouchableOpacity,
<<<<<<< HEAD
ScrollView
=======
ScrollView,
StyleSheet
>>>>>>> changed events styling to be scrollable
} from 'react-native';
import PropTypes from 'prop-types';
import Moment from 'moment';
Expand All @@ -16,12 +21,17 @@ import { styles } from './styles';
const SingleEvent = ({ eventData, eventDataSet, attendEvent }) => {
return (
<View style={styles.container}>
<GradientWrapper>
<View style={styles.eventContainer}>
<Text style={styles.eventTime}>Speakers</Text>
<Text style={styles.eventTime}>{Moment.unix(eventData.startTime).format('h:mmA')} to {Moment.unix(eventData.endTime).format('h:mmA')}</Text>
</View>
<ScrollView>
<LinearGradient
style={StyleSheet.absoluteFill}
colors={[colors.lightGrey, colors.darkGrey]}
start={{ x: 0, y: 0 }}
end={{ x: 0, y: 0.8 }}
>
<ScrollView contentContainerStyle={styles.contentContainer}>
<View style={styles.eventContainer}>
<Text style={styles.eventTime}>Speakers</Text>
<Text style={styles.eventTime}>{Moment.unix(eventData.startTime).format('h:mmA')} to {Moment.unix(eventData.endTime).format('h:mmA')}</Text>
</View>
{eventDataSet.map((item) => (
<View key={item.talk_id}>
<TouchableOpacity onPress={() => goToSpeaker({ item })}>
Expand All @@ -43,7 +53,7 @@ const SingleEvent = ({ eventData, eventDataSet, attendEvent }) => {
onPress={() => attendEvent()}
/>
</ScrollView>
</GradientWrapper>
</LinearGradient>
</View>
);
}
Expand Down
12 changes: 10 additions & 2 deletions js/scenes/Event/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { colors, typography } from '../../config/styles';

export const styles = StyleSheet.create({
container: {
flex: 1
flex: 1,
flexDirection: 'column'
},

eventContainer: {
Expand All @@ -24,6 +25,13 @@ export const styles = StyleSheet.create({
backgroundColor: 'transparent'
},

contentContainer: {
justifyContent: "flex-start",
//flex: 1,
//alignItems: 'center',
width: Dimensions.get('window').width,
},

talkContainer: {
flexDirection: 'row',
marginBottom: 10,
Expand Down Expand Up @@ -57,7 +65,7 @@ export const styles = StyleSheet.create({
color: colors.white,
margin: 5
},

speaker: {
fontFamily: typography.fontMainRegular,
fontSize: typography.robotoRegular14,
Expand Down

0 comments on commit 4534b02

Please sign in to comment.