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
|
2022-04-16 21:34:00 +02:00
|
|
|
button="secondary"
|
2019-05-07 04:35:04 +02:00
|
|
|
icon={ICONS.SHARE}
|
2019-09-04 06:22:31 +02:00
|
|
|
label={__('Share')}
|
2020-04-28 06:19:05 +02:00
|
|
|
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
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|