lbry-desktop/ui/component/shareButton/view.jsx

25 lines
569 B
React
Raw Permalink Normal View History

2019-05-07 04:35:04 +02:00
// @flow
import * as MODALS from 'constants/modal_types';
import * as ICONS from 'constants/icons';
import React from 'react';
import Button from 'component/button';
type Props = {
uri: string,
doOpenModal: (id: string, {}) => void,
};
export default function ShareButton(props: Props) {
2020-03-27 19:57:03 +01:00
const { uri, doOpenModal } = props;
2019-05-07 04:35:04 +02:00
return (
<Button
button="secondary"
2019-05-07 04:35:04 +02:00
icon={ICONS.SHARE}
2019-09-04 06:22:31 +02:00
label={__('Share')}
title={__('Share this channel')}
2020-03-27 19:57:03 +01:00
onClick={() => doOpenModal(MODALS.SOCIAL_SHARE, { uri, webShareable: true })}
2019-05-07 04:35:04 +02:00
/>
);
}