Remove EmojiPicker footer from Reaction Picker
This commit is contained in:
parent
f9164cf0f1
commit
036066cd9a
|
@ -19,7 +19,7 @@ import { IEmoji, ICustomEmojis, TFrequentlyUsedEmojiModel } from '../../definiti
|
|||
import { useAppSelector } from '../../lib/hooks';
|
||||
import { IEmojiPickerProps, EventTypes } from './interfaces';
|
||||
|
||||
const EmojiPicker = React.memo(({ onItemClicked, tabEmojiStyle }: IEmojiPickerProps) => {
|
||||
const EmojiPicker = React.memo(({ onItemClicked, tabEmojiStyle, isEmojiKeyboard = false }: IEmojiPickerProps) => {
|
||||
const [frequentlyUsed, setFrequentlyUsed] = useState<IEmoji[]>([]);
|
||||
const [show, setShow] = useState(false);
|
||||
const [width, setWidth] = useState(null);
|
||||
|
@ -152,10 +152,12 @@ const EmojiPicker = React.memo(({ onItemClicked, tabEmojiStyle }: IEmojiPickerPr
|
|||
: renderCategory(tab.category, i, tab.tabLabel, tabsCount)
|
||||
)}
|
||||
</ScrollableTabView>
|
||||
{isEmojiKeyboard && (
|
||||
<Footer
|
||||
onSearchPressed={() => onItemClicked(EventTypes.SEARCH_PRESSED)}
|
||||
onBackspacePressed={() => onItemClicked(EventTypes.BACKSPACE_PRESSED)}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
});
|
||||
|
|
|
@ -7,9 +7,9 @@ export enum EventTypes {
|
|||
}
|
||||
|
||||
export interface IEmojiPickerProps {
|
||||
baseUrl: string;
|
||||
onItemClicked: (event: EventTypes, emoji?: string) => void;
|
||||
tabEmojiStyle?: StyleProp<TextStyle>;
|
||||
isEmojiKeyboard?: boolean;
|
||||
}
|
||||
|
||||
export interface IFooterProps {
|
||||
|
|
|
@ -22,7 +22,7 @@ const EmojiKeyboard = () => {
|
|||
style={[styles.emojiKeyboardContainer, { borderTopColor: colors.borderColor }]}
|
||||
testID='messagebox-keyboard-emoji'
|
||||
>
|
||||
<EmojiPicker onItemClicked={onItemClicked} />
|
||||
<EmojiPicker onItemClicked={onItemClicked} isEmojiKeyboard={true} />
|
||||
</View>
|
||||
</Provider>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue