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

25 lines
576 B
React
Raw 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,
isChannel: boolean,
2019-05-07 04:35:04 +02:00
doOpenModal: (id: string, {}) => void,
};
export default function ShareButton(props: Props) {
const { uri, doOpenModal, isChannel = false } = props;
2019-05-07 04:35:04 +02:00
return (
<Button
button="alt"
icon={ICONS.SHARE}
2019-09-04 06:22:31 +02:00
label={__('Share')}
onClick={() => doOpenModal(MODALS.SOCIAL_SHARE, { uri, webShareable: true, isChannel })}
2019-05-07 04:35:04 +02:00
/>
);
}