lbry-desktop/ui/modal/modalSocialShare/view.jsx

29 lines
708 B
React
Raw Normal View History

2018-09-12 18:42:15 +02:00
// @flow
import React from 'react';
import { Modal } from 'modal/modal';
import SocialShare from 'component/socialShare';
2020-03-27 19:57:03 +01:00
import Card from 'component/common/card';
2018-09-12 18:42:15 +02:00
type Props = {
closeModal: () => void,
uri: string,
2019-10-29 17:23:56 +01:00
webShareable: boolean,
2021-06-10 20:23:25 +02:00
collectionId?: number,
2018-09-12 18:42:15 +02:00
};
class ModalSocialShare extends React.PureComponent<Props> {
render() {
2021-06-10 20:23:25 +02:00
const { closeModal, uri, webShareable, collectionId } = this.props;
2018-09-12 18:42:15 +02:00
return (
2020-03-27 19:57:03 +01:00
<Modal isOpen onAborted={closeModal} type="card">
2021-06-10 20:23:25 +02:00
<Card
title={__('Share')}
actions={<SocialShare uri={uri} webShareable={webShareable} collectionId={collectionId} />}
/>
2018-09-12 18:42:15 +02:00
</Modal>
);
}
}
export default ModalSocialShare;