2019-05-06 22:35:04 -04: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 14:57:03 -04:00
|
|
|
const { uri, doOpenModal } = props;
|
2019-05-06 22:35:04 -04:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Button
|
|
|
|
button="alt"
|
|
|
|
icon={ICONS.SHARE}
|
2019-09-04 00:22:31 -04:00
|
|
|
label={__('Share')}
|
2020-04-27 21:19:05 -07:00
|
|
|
title={__('Share this channel')}
|
2020-03-27 14:57:03 -04:00
|
|
|
onClick={() => doOpenModal(MODALS.SOCIAL_SHARE, { uri, webShareable: true })}
|
2019-05-06 22:35:04 -04:00
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|