2021-09-13 20:41:05 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import { CancelEditingButton, ToggleEmojiButton } from './buttons';
|
|
|
|
|
|
|
|
interface IMessageBoxLeftButtons {
|
|
|
|
showEmojiKeyboard: boolean;
|
|
|
|
openEmoji(): void;
|
|
|
|
closeEmoji(): void;
|
|
|
|
editing: boolean;
|
|
|
|
editCancel(): void;
|
|
|
|
}
|
|
|
|
|
2022-03-31 22:39:24 +00:00
|
|
|
const LeftButtons = React.memo(({ showEmojiKeyboard, editing, editCancel, openEmoji, closeEmoji }: IMessageBoxLeftButtons) => {
|
|
|
|
if (editing) {
|
|
|
|
return <CancelEditingButton onPress={editCancel} />;
|
2021-09-13 20:41:05 +00:00
|
|
|
}
|
2022-03-31 22:39:24 +00:00
|
|
|
return <ToggleEmojiButton show={showEmojiKeyboard} open={openEmoji} close={closeEmoji} />;
|
|
|
|
});
|
2021-09-13 20:41:05 +00:00
|
|
|
|
|
|
|
export default LeftButtons;
|