lbry-desktop/ui/component/shareButton/view.jsx
2022-04-16 15:34:00 -04:00

24 lines
569 B
JavaScript

// @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) {
const { uri, doOpenModal } = props;
return (
<Button
button="secondary"
icon={ICONS.SHARE}
label={__('Share')}
title={__('Share this channel')}
onClick={() => doOpenModal(MODALS.SOCIAL_SHARE, { uri, webShareable: true })}
/>
);
}