Add more Social Share links Addressing issue #608 #617

Merged
rizdaprasetya merged 4 commits from patch-1 into master 2018-10-08 09:05:36 +02:00
4 changed files with 42 additions and 3 deletions

View file

@ -35,6 +35,7 @@
@import '~row/_row'; @import '~row/_row';
@import '~vertical-split/_vertical-split'; @import '~vertical-split/_vertical-split';
@import '~tooltip/_tooltip'; @import '~tooltip/_tooltip';
@import '~social-share-link/_social-share-link';
@import '~channel-claims-display/_channel-claims-display'; @import '~channel-claims-display/_channel-claims-display';
@import '~dropzone/_dropzone'; @import '~dropzone/_dropzone';

View file

@ -0,0 +1,11 @@
.social-share-link {
flex-wrap: wrap;
margin-right: -0.5em;
margin-left: -0.5em;
}
.social-share-link > a{
padding-right:0.5em;
padding-left:0.5em;
padding-bottom:0.3em;
}

View file

@ -1,9 +1,9 @@
import React from 'react'; import React from 'react';
import SpaceBetween from '@components/SpaceBetween'; import SocialShareLink from '@components/SocialShareLink';
const AssetShareButtons = ({ host, name, shortId }) => { const AssetShareButtons = ({ host, name, shortId }) => {
return ( return (
<SpaceBetween > <SocialShareLink >
<a <a
className='link--primary' className='link--primary'
target='_blank' target='_blank'
@ -32,7 +32,21 @@ const AssetShareButtons = ({ host, name, shortId }) => {
> >
reddit reddit
</a> </a>
</SpaceBetween> <a
className='link--primary'
target='_blank'
href={`https://sharetomastodon.github.io/?title=${name}&url=${host}/${shortId}/${name}`}
>
mastodon
</a>
<a
className='link--primary'
target='_blank'
href={`https://share.diasporafoundation.org/?title=${name}&url=${host}/${shortId}/${name}}
>
diaspora
</a>
</SocialShareLink>
); );
}; };

View file

@ -0,0 +1,13 @@
import React from 'react';
class SocialShareLink extends React.Component {
render () {
return (
<div className={'space-between social-share-link'}>
{this.props.children}
</div>
);
}
}
export default SocialShareLink;