@@ -126,10 +126,12 @@ const getArrowCorrections = (
126126const getArrowPlacementVariant = (
127127 placement : PlacementPropValues ,
128128 background : ContextViewProps [ 'background' ] ,
129- theme : ContextViewTheme
129+ theme : ContextViewTheme ,
130+ props : ContextViewProps
130131) => {
131132 const transformedPlacement = mirrorPlacement ( placement , ' ' )
132133 const isInversed = background === 'inverse'
134+ const { borderColor } = props
133135
134136 if ( endPlacements . includes ( transformedPlacement ) ) {
135137 return {
@@ -140,9 +142,11 @@ const getArrowPlacementVariant = (
140142 marginTop : `calc(-1 * (${ theme ?. arrowSize } + ${ theme ?. arrowBorderWidth } ))` ,
141143 borderInlineEndWidth : '0' ,
142144 borderInlineEndColor : 'transparent' ,
143- borderInlineStartColor : isInversed
144- ? theme ?. arrowBorderColorInverse
145- : theme ?. arrowBorderColor ,
145+ borderInlineStartColor :
146+ borderColor ||
147+ ( isInversed
148+ ? theme ?. arrowBorderColorInverse
149+ : theme ?. arrowBorderColor ) ,
146150 borderTopColor : 'transparent' ,
147151 borderBottomColor : 'transparent' ,
148152 borderInlineStartWidth : theme ?. arrowSize
@@ -173,9 +177,11 @@ const getArrowPlacementVariant = (
173177 marginTop : `calc(-1 * (${ theme ?. arrowSize } + ${ theme ?. arrowBorderWidth } ))` ,
174178 borderInlineStartWidth : '0' ,
175179 borderInlineStartColor : 'transparent' ,
176- borderInlineEndColor : isInversed
177- ? theme ?. arrowBorderColorInverse
178- : theme ?. arrowBorderColor ,
180+ borderInlineEndColor :
181+ borderColor ||
182+ ( isInversed
183+ ? theme ?. arrowBorderColorInverse
184+ : theme ?. arrowBorderColor ) ,
179185 borderTopColor : 'transparent' ,
180186 borderBottomColor : 'transparent' ,
181187 borderInlineEndWidth : theme ?. arrowSize
@@ -261,7 +267,7 @@ const generateStyle = (
261267 componentTheme : ContextViewTheme ,
262268 props : ContextViewProps
263269) : ContextViewStyle => {
264- const { placement, background } = props
270+ const { placement, background, borderColor } = props
265271
266272 const arrowBaseStyles = {
267273 content : '""' ,
@@ -282,7 +288,8 @@ const generateStyle = (
282288 const arrowPlacementVariant = getArrowPlacementVariant (
283289 placement ! ,
284290 background ,
285- componentTheme
291+ componentTheme ,
292+ props
286293 )
287294
288295 return {
@@ -301,7 +308,7 @@ const generateStyle = (
301308 ...arrowBaseStyles ,
302309 display : 'block' ,
303310 borderWidth : `calc(${ componentTheme ?. arrowSize } + ${ componentTheme ?. arrowBorderWidth } )` ,
304- borderColor : arrowBackGroundVariants [ background ! ] ,
311+ borderColor : borderColor || arrowBackGroundVariants [ background ! ] ,
305312 ...arrowPlacementVariant . main ,
306313 ...getArrowCorrections ( placement ! , componentTheme ) ,
307314 '&::after' : {
0 commit comments