@@ -3,7 +3,7 @@ import { ViewStyle } from "react-native";
33import Svg , { Path } from "react-native-svg" ;
44
55import { useTheme } from "../../theme" ;
6- import { IconProps } from "../../utils" ;
6+ import { cx , IconProps } from "../../utils" ;
77import { Icon } from "../icon" ;
88
99import { TooltipPlacement } from "./Tooltip" ;
@@ -118,22 +118,22 @@ const TooltipArrow: React.FC<TooltipArrowProps> = ({
118118 arrowProps,
119119} ) => {
120120 const tailwind = useTheme ( ) ;
121+ const tooltipTheme = useTheme ( "tooltip" ) ;
122+
121123 const additonalArrowStyles = getArrowStyles ( {
122124 placement : actualPlacement ,
123125 height : 12 ,
124126 width : 12 ,
125127 } ) ;
126128 const arrowStyles : ViewStyle = {
127- position : "absolute" ,
128- height : 12 ,
129- width : 12 ,
129+ ...tailwind . style ( cx ( tooltipTheme . arrow . container ) ) ,
130130 ...additonalArrowStyles ,
131131 ...arrowProps ?. style ,
132132 } ;
133133 if ( actualPlacement ?. split ( " " ) [ 0 ] === "top" ) {
134134 return (
135135 < Icon
136- color = { tailwind . getColor ( "text-gray-900" ) }
136+ color = { tailwind . getColor ( cx ( tooltipTheme . arrow . iconColor ) ) }
137137 style = { arrowStyles }
138138 icon = { < DownArrow /> }
139139 size = { 12 }
@@ -142,7 +142,7 @@ const TooltipArrow: React.FC<TooltipArrowProps> = ({
142142 } else if ( actualPlacement ?. split ( " " ) [ 0 ] === "left" ) {
143143 return (
144144 < Icon
145- color = { tailwind . getColor ( "text-gray-900" ) }
145+ color = { tailwind . getColor ( cx ( tooltipTheme . arrow . iconColor ) ) }
146146 style = { arrowStyles }
147147 icon = { < RightArrow /> }
148148 size = { 12 }
@@ -151,7 +151,7 @@ const TooltipArrow: React.FC<TooltipArrowProps> = ({
151151 } else if ( actualPlacement ?. split ( " " ) [ 0 ] === "right" ) {
152152 return (
153153 < Icon
154- color = { tailwind . getColor ( "text-gray-900" ) }
154+ color = { tailwind . getColor ( cx ( tooltipTheme . arrow . iconColor ) ) }
155155 style = { arrowStyles }
156156 icon = { < LeftArrow /> }
157157 size = { 12 }
@@ -160,7 +160,7 @@ const TooltipArrow: React.FC<TooltipArrowProps> = ({
160160 } else if ( actualPlacement ?. split ( " " ) [ 0 ] === "bottom" ) {
161161 return (
162162 < Icon
163- color = { tailwind . getColor ( "text-gray-900" ) }
163+ color = { tailwind . getColor ( cx ( tooltipTheme . arrow . iconColor ) ) }
164164 style = { arrowStyles }
165165 icon = { < UpArrow /> }
166166 size = { 12 }
0 commit comments