| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- import React from 'react'
- import { View, ViewStyle, Image, TouchableOpacity, StyleSheet, } from 'react-native'
- import c from '../../color/colors'
- import t from '../../translator/translator'
- import { MyText, } from '../../components/texts'
- type Props = {
- containerViewStyle: ViewStyle,
- secondsText: String,
- isRecording: Boolean,
- onPressTakePhoto: () => void,
- onPressPauseResume: () => void,
- }
- export default BottomView = (props: Props) =>
- {
- return (
- <View style={ styles.container }>
- <View style={ styles.btnsView }>
- <View style={ styles.leftSideView }>
- </View>
- <View style={ styles.centerSideView }>
- <View style={ styles.takePhotoBtnView }>
- {
- props.isRecording ?
- <TouchableOpacity
- style = { styles.takePhotoSquareBtn }
- onPress = { props.onPressTakePhoto }
- hitSlop = { {
- top: 10,
- left: 10,
- right: 10,
- bottom: 10,
- } }
- />
- :
- <TouchableOpacity
- style = { styles.takePhotoBtn }
- onPress = { props.onPressTakePhoto }
- hitSlop = { {
- top: 10,
- left: 10,
- right: 10,
- bottom: 10,
- } }
- />
- }
-
- </View>
- </View>
- <View style={ styles.rightSideView }>
- <View style={ styles.pauseResumeBtnView }>
- <TouchableOpacity
- style = { styles.pauseResumeBtn }
- onPress = { props.onPressPauseResume }
- hitSlop = { {
- top: 20,
- left: 20,
- right: 20,
- bottom: 20,
- } }
- >
- <Image
- style = { styles.changeCameraImg }
- source = { require('../../../assets/icons/common/camera_pause_icon.png') }
- />
- </TouchableOpacity>
- </View>
- </View>
- </View>
- </View>
- )
- }
- BottomView.defaultProps = {
- isRecording: false,
- }
- const styles = StyleSheet.create({
- container: {
- paddingBottom: 50,
- },
- btnsView: {
- marginTop: 20,
- paddingHorizontal: 20,
- flexDirection: 'row',
- alignItems: 'center',
- },
- leftSideView: {
- flex: 1,
- alignItems: 'flex-start',
- },
- centerSideView: {
- flex: 1,
- alignItems: 'center',
- },
- rightSideView: {
- flex: 1,
- alignItems: 'flex-end',
- },
- takePhotoBtnView: {
- height: 70,
- aspectRatio: 1,
- borderWidth: 5,
- borderColor: c().main_white,
- borderRadius: 50,
- },
- takePhotoBtn: {
- margin: 2,
- flex: 1,
- backgroundColor: c().main_white,
- borderRadius: 50,
- },
- takePhotoSquareBtn: {
- margin: 15,
- flex: 1,
- backgroundColor: c().main_red,
- borderRadius: 5,
- },
- pauseResumeBtnView: {
- height: 52,
- alignItems: 'center',
- justifyContent: 'center',
- aspectRatio: 1,
- borderColor: c().main_white,
- borderWidth: 3,
- borderRadius: 50,
- },
- pauseResumeBtn: {
- },
- })
|