-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
245 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
module.exports = { | ||
preset: 'react-native', | ||
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect'], | ||
coverageThreshold: { | ||
global: { | ||
statements: 100, | ||
branches: 90, | ||
functions: 90, | ||
lines: 90, | ||
}, | ||
}, | ||
}; |
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,76 @@ | ||
import React from 'react'; | ||
import {View, Text, TouchableOpacity, Platform, StyleSheet} from 'react-native'; | ||
import {useNavigation} from '@react-navigation/native'; | ||
|
||
const CustomHeader = ({ | ||
title, | ||
description, | ||
itemsCount, | ||
}: { | ||
title: string; | ||
description: string; | ||
itemsCount: number; | ||
}) => { | ||
const navigation = useNavigation(); | ||
|
||
return ( | ||
<View style={styles.header}> | ||
<TouchableOpacity | ||
onPress={() => navigation.goBack()} | ||
style={styles.backButton}> | ||
<Text style={styles.backButtonText}>Back</Text> | ||
</TouchableOpacity> | ||
<View style={styles.titleDescriptionContainer}> | ||
<View style={styles.descriptionBlock}> | ||
<Text style={styles.title}>{title}</Text> | ||
<Text style={styles.itemsCount}>{`(${itemsCount})`}</Text> | ||
</View> | ||
<Text style={styles.description}>{description}</Text> | ||
</View> | ||
</View> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
header: { | ||
backgroundColor: '#ffffff', | ||
paddingTop: 24, | ||
flexDirection: 'column', | ||
borderBottomWidth: 1, | ||
borderBottomColor: '#ccc', | ||
paddingHorizontal: 15, | ||
}, | ||
backButton: { | ||
alignSelf: 'flex-start', | ||
}, | ||
backButtonText: { | ||
color: '#007AFF', | ||
fontSize: 16, | ||
}, | ||
titleDescriptionContainer: { | ||
flexDirection: 'column', | ||
justifyContent: 'flex-start', | ||
marginTop: 8, | ||
}, | ||
itemsCount: { | ||
color: '#acacb0', | ||
paddingLeft: 5, | ||
}, | ||
descriptionBlock: { | ||
flexDirection: 'row', | ||
justifyContent: 'flex-start', | ||
alignItems: 'center', | ||
}, | ||
title: { | ||
fontSize: 18, | ||
fontWeight: 'bold', | ||
color: '#333', | ||
}, | ||
description: { | ||
fontSize: 14, | ||
color: '#666', | ||
paddingBottom: 10, | ||
}, | ||
}); | ||
|
||
export default CustomHeader; |
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 @@ | ||
export {default} from './component'; |
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,105 @@ | ||
import React from 'react'; | ||
|
||
import {View, StyleSheet} from 'react-native'; | ||
import {Card, Chip, Text} from 'react-native-paper'; | ||
|
||
const DetailMovieModal = () => ( | ||
<View style={styles.container}> | ||
<Card style={styles.card}> | ||
<View style={styles.titleContainer}> | ||
<Card.Title style={styles.title} title="Movie name1" /> | ||
<Text style={styles.popularityText} variant="labelSmall"> | ||
23 | ||
</Text> | ||
</View> | ||
<Card.Content> | ||
<View style={styles.middleContentContainer}> | ||
<Text variant="titleSmall">12.02.22</Text> | ||
<View style={styles.middleContentBlock}> | ||
<Text style={styles.rate} variant="titleSmall"> | ||
6.8 | ||
</Text> | ||
<Text style={styles.vote} variant="titleSmall"> | ||
(43 456) | ||
</Text> | ||
</View> | ||
</View> | ||
<Text style={styles.description} variant="bodySmall"> | ||
Description | ||
</Text> | ||
</Card.Content> | ||
<View style={styles.chipContainer}> | ||
<Chip style={styles.chip}>Genres 1</Chip> | ||
<Chip style={styles.chip}>Genres 2</Chip> | ||
<Chip style={styles.chip}>Genres 3</Chip> | ||
</View> | ||
</Card> | ||
</View> | ||
); | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
padding: 15, | ||
}, | ||
chip: { | ||
width: 100, | ||
backgroundColor: '#ebebeb', | ||
color: '#232323', | ||
borderRadius: 25, | ||
paddingRight: 5, | ||
marginBottom: 5, | ||
}, | ||
title: { | ||
width: '70%', | ||
}, | ||
description: { | ||
paddingTop: 10, | ||
paddingBottom: 10, | ||
width: '100%', | ||
}, | ||
vote: { | ||
color: '#acacb0', | ||
paddingLeft: 5, | ||
}, | ||
rate: { | ||
fontWeight: 'bold', | ||
}, | ||
middleContentContainer: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'flex-start', | ||
alignItems: 'center', | ||
}, | ||
middleContentBlock: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'flex-start', | ||
alignItems: 'center', | ||
paddingLeft: 20, | ||
}, | ||
popularityText: { | ||
width: '30%', | ||
textAlign: 'right', | ||
paddingTop: 15, | ||
paddingRight: 15, | ||
}, | ||
chipContainer: { | ||
width: '100%', | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
flexWrap: 'wrap', | ||
padding: 10, | ||
}, | ||
card: { | ||
backgroundColor: '#ffffff', | ||
}, | ||
titleContainer: { | ||
width: '100%', | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
}, | ||
}); | ||
|
||
export default DetailMovieModal; |
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 @@ | ||
export {default} from './component'; |
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