11// @flow
22import React from 'react' ;
3- import { View , Text , TouchableOpacity } from 'react-native' ;
3+ import { View , Text , Image , TouchableOpacity } from 'react-native' ;
44
55import Button from './Button' ;
66
@@ -24,37 +24,42 @@ const Tooltip = ({
2424 handlePrev,
2525 handleStop,
2626 currentStep,
27- } : Props ) => (
28- < View >
29- < View style = { styles . tooltipContainer } >
30- < Text testID = "stepDescription" style = { styles . tooltipText } > { currentStep . text } </ Text >
27+ } : Props ) => {
28+ return (
29+ < View >
30+ < View style = { styles . imageContainer } >
31+ < Image style = { { flex : 1 } } source = { currentStep . imageSource } />
32+ </ View >
33+ < View style = { styles . tooltipContainer } >
34+ < Text testID = "stepDescription" style = { styles . tooltipText } > { currentStep . text } </ Text >
35+ </ View >
36+ < View style = { [ styles . bottomBar ] } >
37+ {
38+ ! isLastStep ?
39+ < TouchableOpacity onPress = { handleStop } >
40+ < Button > Skip</ Button >
41+ </ TouchableOpacity >
42+ : null
43+ }
44+ {
45+ ! isFirstStep ?
46+ < TouchableOpacity onPress = { handlePrev } >
47+ < Button > Previous</ Button >
48+ </ TouchableOpacity >
49+ : null
50+ }
51+ {
52+ ! isLastStep ?
53+ < TouchableOpacity onPress = { handleNext } >
54+ < Button > Next</ Button >
55+ </ TouchableOpacity > :
56+ < TouchableOpacity onPress = { handleStop } >
57+ < Button > Finish</ Button >
58+ </ TouchableOpacity >
59+ }
60+ </ View >
3161 </ View >
32- < View style = { [ styles . bottomBar ] } >
33- {
34- ! isLastStep ?
35- < TouchableOpacity onPress = { handleStop } >
36- < Button > Skip</ Button >
37- </ TouchableOpacity >
38- : null
39- }
40- {
41- ! isFirstStep ?
42- < TouchableOpacity onPress = { handlePrev } >
43- < Button > Previous</ Button >
44- </ TouchableOpacity >
45- : null
46- }
47- {
48- ! isLastStep ?
49- < TouchableOpacity onPress = { handleNext } >
50- < Button > Next</ Button >
51- </ TouchableOpacity > :
52- < TouchableOpacity onPress = { handleStop } >
53- < Button > Finish</ Button >
54- </ TouchableOpacity >
55- }
56- </ View >
57- </ View >
58- ) ;
62+ )
63+ } ;
5964
6065export default Tooltip ;
0 commit comments