44 HSpacer ,
55 IOButton ,
66 IOColors ,
7+ useIOTheme ,
78 VSpacer
89} from "@pagopa/io-app-design-system" ;
910import { useCallback , useState } from "react" ;
@@ -36,8 +37,10 @@ export const TourTooltip = ({
3637 totalSteps
3738} : Props ) => {
3839 const dispatch = useIODispatch ( ) ;
40+ const theme = useIOTheme ( ) ;
3941 const groupId = useIOSelector ( activeGroupIdSelector ) ;
4042 const insets = useSafeAreaInsets ( ) ;
43+ const tooltipBgColor = IOColors [ theme [ "appBackground-primary" ] ] ;
4144 const { width : screenWidth , height : screenHeight } = Dimensions . get ( "screen" ) ;
4245 const { handleNext } = useTourStepNavigation ( ) ;
4346
@@ -93,23 +96,37 @@ export const TourTooltip = ({
9396 onLayout = { e => setTooltipHeight ( e . nativeEvent . layout . height ) }
9497 pointerEvents = "box-none"
9598 >
96- { showAbove && < View style = { [ styles . arrowDown , { left : arrowLeft } ] } /> }
99+ { showAbove && (
100+ < View
101+ style = { [
102+ styles . arrowDown ,
103+ { left : arrowLeft , borderTopColor : tooltipBgColor }
104+ ] }
105+ />
106+ ) }
97107 { ! showAbove && (
98- < View style = { [ styles . arrowUp , { left : arrowLeft , top : - ARROW_SIZE } ] } />
108+ < View
109+ style = { [
110+ styles . arrowUp ,
111+ {
112+ left : arrowLeft ,
113+ top : - ARROW_SIZE ,
114+ borderBottomColor : tooltipBgColor
115+ }
116+ ] }
117+ />
99118 ) }
100- < View style = { styles . tooltip } >
101- < H6 color = "white" > { title } </ H6 >
119+ < View style = { [ styles . tooltip , { backgroundColor : tooltipBgColor } ] } >
120+ < H6 > { title } </ H6 >
102121 < VSpacer size = { 4 } />
103- < Body color = "white" > { description } </ Body >
122+ < Body > { description } </ Body >
104123 < VSpacer size = { 8 } />
105- < Body color = "white" weight = "Semibold" >
106- { `${ stepIndex + 1 } / ${ totalSteps } ` }
107- </ Body >
124+ < Body weight = "Semibold" > { `${ stepIndex + 1 } / ${ totalSteps } ` } </ Body >
108125 < VSpacer size = { 16 } />
109126 < View style = { styles . buttonsRow } >
110127 < IOButton
111128 variant = "link"
112- color = "contrast "
129+ color = "primary "
113130 label = { I18n . t ( "features.tour.skip" ) }
114131 onPress = { handleSkip }
115132 />
@@ -118,16 +135,16 @@ export const TourTooltip = ({
118135 < >
119136 < IOButton
120137 variant = "link"
121- color = "contrast "
138+ color = "primary "
122139 label = { I18n . t ( "features.tour.back" ) }
123140 onPress = { handleBack }
124141 />
125142 < HSpacer size = { 8 } />
126143 </ >
127144 ) }
128145 < IOButton
129- variant = "solid "
130- color = "contrast "
146+ variant = "link "
147+ color = "primary "
131148 label = {
132149 isLastStep
133150 ? I18n . t ( "features.tour.done" )
@@ -148,8 +165,8 @@ const styles = StyleSheet.create({
148165 zIndex : 10000
149166 } ,
150167 tooltip : {
151- backgroundColor : IOColors [ "blueIO-850" ] ,
152168 borderRadius : 8 ,
169+ borderCurve : "continuous" ,
153170 padding : 16
154171 } ,
155172 buttonsRow : {
@@ -170,7 +187,7 @@ const styles = StyleSheet.create({
170187 borderBottomWidth : ARROW_SIZE ,
171188 borderLeftColor : TRANSPARENT ,
172189 borderRightColor : TRANSPARENT ,
173- borderBottomColor : IOColors [ "blueIO-850" ] ,
190+ borderBottomColor : TRANSPARENT ,
174191 zIndex : 10001
175192 } ,
176193 arrowDown : {
@@ -183,7 +200,7 @@ const styles = StyleSheet.create({
183200 borderTopWidth : ARROW_SIZE ,
184201 borderLeftColor : TRANSPARENT ,
185202 borderRightColor : TRANSPARENT ,
186- borderTopColor : IOColors [ "blueIO-850" ] ,
203+ borderTopColor : TRANSPARENT ,
187204 zIndex : 10001
188205 }
189206} ) ;
0 commit comments