File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { ImageSourcePropType, ImageURISource } from 'react-native';
7
7
import type { SFSymbols5_0 } from 'sf-symbols-typescript' ;
8
8
import type { DropdownMenuContentProps } from '@radix-ui/react-dropdown-menu' ;
9
9
import { ButtonPressAnimation } from './animations' ;
10
+ import ConditionalWrap from 'conditional-wrap' ;
10
11
11
12
export const DropdownMenuRoot = DropdownMenuPrimitive . Root ;
12
13
export const DropdownMenuTrigger = DropdownMenuPrimitive . Trigger ;
@@ -112,7 +113,12 @@ export function DropdownMenu<T extends string>({
112
113
return (
113
114
< DropdownMenuRoot >
114
115
< DropdownMenuTrigger action = { triggerAction } >
115
- < ButtonPressAnimation testID = { testID } > { children } </ ButtonPressAnimation >
116
+ < ConditionalWrap
117
+ condition = { triggerAction === 'press' }
118
+ wrap = { children => < ButtonPressAnimation testID = { testID } > { children } </ ButtonPressAnimation > }
119
+ >
120
+ { children }
121
+ </ ConditionalWrap >
116
122
</ DropdownMenuTrigger >
117
123
< DropdownMenuContent
118
124
loop = { loop }
You can’t perform that action at this time.
0 commit comments