2020-02-17 12:14:56 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import BaseButton from './BaseButton';
|
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
interface IToggleEmojiButton {
|
|
|
|
show: boolean;
|
|
|
|
open(): void;
|
|
|
|
close(): void;
|
|
|
|
}
|
|
|
|
|
2022-03-31 22:39:24 +00:00
|
|
|
const ToggleEmojiButton = ({ show, open, close }: IToggleEmojiButton) => {
|
2020-02-17 12:14:56 +00:00
|
|
|
if (show) {
|
|
|
|
return (
|
2022-03-31 22:39:24 +00:00
|
|
|
<BaseButton onPress={close} testID='messagebox-close-emoji' accessibilityLabel='Close_emoji_selector' icon='keyboard' />
|
2020-02-17 12:14:56 +00:00
|
|
|
);
|
|
|
|
}
|
2022-03-31 22:39:24 +00:00
|
|
|
return <BaseButton onPress={open} testID='messagebox-open-emoji' accessibilityLabel='Open_emoji_selector' icon='emoji' />;
|
|
|
|
};
|
2020-02-17 12:14:56 +00:00
|
|
|
|
|
|
|
export default ToggleEmojiButton;
|