-
Notifications
You must be signed in to change notification settings - Fork 0
/
bodyfooter.js
70 lines (56 loc) · 1.73 KB
/
bodyfooter.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import React, { Component,useState } from 'react'
import {
StyleSheet,
TouchableOpacity,
Text,
View,
TextInput, Button,
Alert, FlatList, Image
} from 'react-native'
import Icon from 'react-native-vector-icons/Ionicons';
import FooterChild from './footerchild1'
import WhiteDesign from './whitebutton'
export default bodyfooter = (props) => {
const [showMoreOption,setMoreOption] = useState(false);
const childOne = () =>{
if(showMoreOption){
return(<FooterChild />);
}
return null;
}
const childTwo = () => {
if(showMoreOption){
return(<View style={{flexDirection:'row',justifyContent:'space-evenly',width:'80%'}}><FooterChild con={showMoreOption} type={"camera"}/><FooterChild con={showMoreOption} type={"gallery"}/></View>);
}
return null;
}
const addMoreOption = () => {
// //console.warn("methods involked");
if(!showMoreOption) {
setMoreOption(true);
}else{
setMoreOption(false)
}
}
return (
<View style={style.footer1} >
<WhiteDesign/>
<View style={{width:'60%',flexDirection:'row',justifyContent:'flex-end',alignContent:'flex-end'}}>
{childTwo()}
<TouchableOpacity onPress ={addMoreOption}>
<FooterChild con={showMoreOption} type={"cross"}/>
</TouchableOpacity>
{/* {addMoreOption()}; */}
{/* {childOne()} */}
</View>
</View>
);
}
const style = StyleSheet.create(
{
footer1: {
width: '100%',padding:5,
height: '10%',flexDirection:'row',justifyContent:'space-evenly',alignItems:'center',backgroundColor:'white'
}
}
)