2019-05-27 16:19:39 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
2020-07-06 19:23:46 +00:00
|
|
|
import { SendButton } from './buttons';
|
2019-05-27 16:19:39 +00:00
|
|
|
|
2020-07-06 19:23:46 +00:00
|
|
|
const RightButtons = React.memo(({ theme, showSend, submit }) => {
|
2019-05-27 16:19:39 +00:00
|
|
|
if (showSend) {
|
2019-12-04 16:39:53 +00:00
|
|
|
return <SendButton theme={theme} onPress={submit} />;
|
2019-05-27 16:19:39 +00:00
|
|
|
}
|
2020-02-20 21:02:09 +00:00
|
|
|
return null;
|
2019-05-27 16:19:39 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
RightButtons.propTypes = {
|
2019-12-04 16:39:53 +00:00
|
|
|
theme: PropTypes.string,
|
2019-05-27 16:19:39 +00:00
|
|
|
showSend: PropTypes.bool,
|
2020-07-06 19:23:46 +00:00
|
|
|
submit: PropTypes.func.isRequired
|
2019-05-27 16:19:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default RightButtons;
|