File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
ts/features/tour/components Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ import { TourItemMeasurement } from "../types";
2323import { useTourStepNavigation } from "../hooks/useTourStepNavigation" ;
2424
2525const TOOLTIP_MARGIN = 16 ;
26- const ARROW_SIZE = 10 ;
26+ const ARROW_SIZE = 20 ;
27+ const ARROW_VISIBLE = ARROW_SIZE / 3 ;
2728const BORDER_RADIUS = 8 ;
2829
2930type Props = {
@@ -60,10 +61,10 @@ export const TourTooltip = ({
6061 const showAbove = spaceAbove > spaceBelow ;
6162
6263 const tooltipTop = showAbove
63- ? itemMeasurement . y - tooltipHeight - ARROW_SIZE / 2 - TOOLTIP_MARGIN
64+ ? itemMeasurement . y - tooltipHeight - ARROW_VISIBLE - TOOLTIP_MARGIN
6465 : itemMeasurement . y +
6566 itemMeasurement . height +
66- ARROW_SIZE / 2 +
67+ ARROW_VISIBLE +
6768 TOOLTIP_MARGIN ;
6869
6970 const itemCenterX = itemMeasurement . x + itemMeasurement . width / 2 ;
@@ -118,8 +119,8 @@ export const TourTooltip = ({
118119 backgroundColor : tooltipBgColor ,
119120 left : arrowLeft ,
120121 ...( showAbove
121- ? { bottom : - ARROW_SIZE / 2 }
122- : { top : - ARROW_SIZE / 2 } )
122+ ? { bottom : - ARROW_VISIBLE }
123+ : { top : - ARROW_VISIBLE } )
123124 }
124125 ] }
125126 />
@@ -189,6 +190,8 @@ const styles = StyleSheet.create({
189190 position : "absolute" ,
190191 width : ARROW_SIZE ,
191192 height : ARROW_SIZE ,
193+ borderRadius : 4 ,
194+ borderCurve : "continuous" ,
192195 transform : [ { rotate : "45deg" } ] ,
193196 zIndex : 2
194197 }
You can’t perform that action at this time.
0 commit comments