verdnatura-chat/app/containers/MessageBox/LeftButtons.ios.js

23 lines
588 B
JavaScript
Raw Normal View History

import React from 'react';
import PropTypes from 'prop-types';
import { CancelEditingButton, ActionsButton } from './buttons';
const LeftButtons = React.memo(({
theme, showMessageBoxActions, editing, editCancel
}) => {
if (editing) {
2019-12-04 16:39:53 +00:00
return <CancelEditingButton onPress={editCancel} theme={theme} />;
}
return <ActionsButton onPress={showMessageBoxActions} theme={theme} />;
});
LeftButtons.propTypes = {
2019-12-04 16:39:53 +00:00
theme: PropTypes.string,
showMessageBoxActions: PropTypes.func.isRequired,
editing: PropTypes.bool,
editCancel: PropTypes.func.isRequired
};
export default LeftButtons;