lbry-desktop/src/ui/modal/modalSendTip/view.jsx

35 lines
826 B
React
Raw Normal View History

2018-03-26 23:32:43 +02:00
// @flow
import React from 'react';
import { Modal } from 'modal/modal';
import SendTip from 'component/walletSendTip';
2018-09-26 19:48:07 +02:00
import UriIndicator from 'component/uriIndicator';
2018-03-26 23:32:43 +02:00
type Props = {
closeModal: () => void,
uri: string,
claimIsMine: boolean,
2018-03-26 23:32:43 +02:00
};
class ModalSendTip extends React.PureComponent<Props> {
render() {
const { closeModal, uri, claimIsMine } = this.props;
2018-03-26 23:32:43 +02:00
return (
2018-09-26 19:48:07 +02:00
<Modal
onAborted={closeModal}
isOpen
type="custom"
title={
<React.Fragment>
{claimIsMine ? __('Add support to') : __('Send a tip')} <UriIndicator uri={uri} />
2018-09-26 19:48:07 +02:00
</React.Fragment>
}
>
<SendTip uri={uri} claimIsMine={claimIsMine} onCancel={closeModal} sendTipCallback={closeModal} />
2018-03-26 23:32:43 +02:00
</Modal>
);
}
}
export default ModalSendTip;