@@ -10,6 +10,8 @@ import { connect } from "react-redux";
1010import Colors from "../../constants/Colors" ;
1111import { ScrollView } from "react-native-gesture-handler" ;
1212import { getColors } from "../reusable/getColors" ;
13+ import Carousel from 'react-native-carousel-view' ;
14+ //import Carousel, { Pagination } from 'react-native-snap-carousel';
1315
1416const mapStateToProps = ( state ) => {
1517 return {
@@ -43,30 +45,50 @@ const DiningMenu = (props) => {
4345 return (
4446
4547 < View style = { styles . screen } >
46- < View style = { styles . header } >
47- < Text style = { styles . title } > { props . children } Sharpe Refrectory</ Text >
48- { /* <TouchableOpacity>
49- <AntDesign
50- style={styles.star}
51- name={starName}
52- size={30}
53- color={starColor}
54- />
55- </TouchableOpacity> */ }
48+ < Carousel
49+ width = { 400 }
50+ height = { 525 }
51+ animate = { false }
52+ indicatorSize = { 10 }
53+ inactiveDotColor = { Colors . inactive }
54+ delay = { 0 }
55+ onScroll = { ( ) => console . log ( 'on scroll view' ) }
56+ onScrollBegin = { ( ) => console . log ( 'scroll begin' ) }
57+ onPageChange = { ( page ) => console . log ( 'scroll change' , page ) }
58+ >
59+ < View style = { styles . contentContainer } >
60+ < View style = { styles . header } >
61+ < Text style = { styles . title } > { props . children } Sharpe Refrectory</ Text >
62+ { /* <TouchableOpacity>
63+ <AtDesign
64+ style={styles.star}
65+ name={starName}
66+ size={30}
67+ color={starColor}
68+ />
69+ </TouchableOpacity> */ }
70+ </ View >
71+ < View >
72+ { hoursHandler ( ) }
73+ </ View >
74+ < View style = { styles . mealInfo } >
75+ < Text style = { styles . text } > Now Serving</ Text >
76+ < Text style = { [ styles . text , styles . mealStatus ] } > Breakfast</ Text >
77+ </ View >
78+ < Text style = { styles . menuTitle } > Entrees</ Text >
79+ < View style = { styles . horizontalLine } />
80+ < Text style = { styles . menuTitle } > Fresh Fruits</ Text >
81+ < View style = { styles . horizontalLine } />
82+ < Text style = { styles . menuTitle } > Desserts</ Text >
83+ < View style = { styles . horizontalLine } />
5684 </ View >
57- < View >
58- { hoursHandler ( ) }
59- </ View >
60- < View style = { styles . mealInfo } >
61- < Text style = { styles . text } > Now Serving</ Text >
62- < Text style = { [ styles . text , styles . mealStatus ] } > Breakfast</ Text >
63- </ View >
64- < Text style = { styles . menuTitle } > Entrees</ Text >
65- < View style = { styles . horizontalLine } />
66- < Text style = { styles . menuTitle } > Fresh Fruits</ Text >
67- < View style = { styles . horizontalLine } />
68- < Text style = { styles . menuTitle } > Desserts</ Text >
69- < View style = { styles . horizontalLine } />
85+ < View style = { styles . contentContainer } >
86+ < Text > Page 2</ Text >
87+ </ View >
88+ < View style = { styles . contentContainer } >
89+ < Text > Page 3</ Text >
90+ </ View >
91+ </ Carousel >
7092 </ View >
7193 ) ;
7294} ;
@@ -86,6 +108,12 @@ const getStyles = (Colors) => StyleSheet.create({
86108 alignItems : "center" ,
87109 backgroundColor : "#fafafa" ,
88110 } ,
111+ contentContainer : {
112+ borderWidth : 0 ,
113+ flex : 1 ,
114+ justifyContent : 'center' ,
115+ alignItems : 'center' ,
116+ } ,
89117 header : {
90118 height : 110 ,
91119 backgroundColor : "#f9f9f9" ,
0 commit comments