-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #187 from MarkusPaulsen/dev
Need to merge dev into backendSprint7 for latest API referanses
- Loading branch information
Showing
77 changed files
with
5,812 additions
and
3,838 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import React from "react"; | ||
import { | ||
FlatList, | ||
Modal, | ||
View, | ||
Text, | ||
StyleSheet, | ||
TouchableOpacity | ||
} from "react-native"; | ||
import Icon from "react-native-vector-icons/MaterialIcons"; | ||
import * as Typography from "../../styles/typography"; | ||
|
||
const renderItem = item => { | ||
return ( | ||
<View style={{ flexDirection: "row", justifyContent: "space-between", width: 200, marginBottom: 20 }}> | ||
<Text style={Typography.FONT_MED_BLACK}>{item.day}</Text> | ||
<View style={{ flexDirection: "row" }}> | ||
<Text style={Typography.FONT_REGULAR_THIN}>{item.openTime}</Text> | ||
<Text style={Typography.FONT_REGULAR_THIN}> - </Text> | ||
<Text style={Typography.FONT_REGULAR_THIN}>{item.closeTime}</Text> | ||
</View> | ||
</View> | ||
); | ||
}; | ||
|
||
const OpeningHours = ({ visible, data, backButton }) => { | ||
return ( | ||
<Modal visible={visible}> | ||
<View style={styles.container}> | ||
<TouchableOpacity onPress={backButton}> | ||
<Icon name={"chevron-left"} size={40} style={styles.button} /> | ||
</TouchableOpacity> | ||
<Text | ||
style={[ | ||
Typography.FONT_H3_BLACK, | ||
{ alignSelf: "center", marginBottom: 30 } | ||
]} | ||
> | ||
Opening Hours | ||
</Text> | ||
<View style={{ alignSelf: "center" }}> | ||
<FlatList | ||
data={data} | ||
renderItem={({ item }) => renderItem(item)} | ||
keyExtractor={(item, index) => index.toString()} | ||
/> | ||
</View> | ||
</View> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default OpeningHours; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
marginTop: 40, | ||
marginBottom: 40 | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.