@@ -11,25 +11,27 @@ import Tooltip from '@components/Tooltip/PopoverAnchorTooltip';
1111import useLocalize from '@hooks/useLocalize' ;
1212import useStyleUtils from '@hooks/useStyleUtils' ;
1313import useThemeStyles from '@hooks/useThemeStyles' ;
14+ import { hideEmojiPicker , isEmojiPickerVisible , resetEmojiPopoverAnchor , showEmojiPicker } from '@libs/actions/EmojiPickerAction' ;
15+ import type { OnModalHideValue } from '@libs/actions/EmojiPickerAction' ;
1416import getButtonState from '@libs/getButtonState' ;
15- import * as EmojiPickerAction from '@userActions/EmojiPickerAction' ;
1617import CONST from '@src/CONST' ;
1718
1819type EmojiPickerButtonDropdownProps = {
1920 /** Flag to disable the emoji picker button */
2021 isDisabled ?: boolean ;
2122 accessibilityLabel ?: string ;
2223 role ?: string ;
23- onModalHide : EmojiPickerAction . OnModalHideValue ;
24+ onModalHide : OnModalHideValue ;
2425 onInputChange : ( emoji : string ) => void ;
2526 value ?: string ;
2627 disabled ?: boolean ;
2728 style : StyleProp < ViewStyle > ;
29+ withoutOverlay ?: boolean ;
2830} ;
2931
3032function EmojiPickerButtonDropdown (
3133 // eslint-disable-next-line @typescript-eslint/no-unused-vars
32- { isDisabled = false , onModalHide, onInputChange, value, disabled, style, ...otherProps } : EmojiPickerButtonDropdownProps ,
34+ { isDisabled = false , withoutOverlay = false , onModalHide, onInputChange, value, disabled, style, ...otherProps } : EmojiPickerButtonDropdownProps ,
3335 // eslint-disable-next-line @typescript-eslint/no-unused-vars
3436 ref : ForwardedRef < AnimatedTextInputRef > ,
3537) {
@@ -38,14 +40,14 @@ function EmojiPickerButtonDropdown(
3840 const emojiPopoverAnchor = useRef ( null ) ;
3941 const { translate} = useLocalize ( ) ;
4042
41- useEffect ( ( ) => EmojiPickerAction . resetEmojiPopoverAnchor , [ ] ) ;
43+ useEffect ( ( ) => resetEmojiPopoverAnchor , [ ] ) ;
4244 const onPress = ( ) => {
43- if ( EmojiPickerAction . isEmojiPickerVisible ( ) ) {
44- EmojiPickerAction . hideEmojiPicker ( ) ;
45+ if ( isEmojiPickerVisible ( ) ) {
46+ hideEmojiPicker ( ) ;
4547 return ;
4648 }
4749
48- EmojiPickerAction . showEmojiPicker (
50+ showEmojiPicker (
4951 onModalHide ,
5052 ( emoji ) => onInputChange ( emoji ) ,
5153 emojiPopoverAnchor ,
@@ -57,6 +59,7 @@ function EmojiPickerButtonDropdown(
5759 ( ) => { } ,
5860 undefined ,
5961 value ,
62+ withoutOverlay ,
6063 ) ;
6164 } ;
6265
0 commit comments