Merge pull request #617 from rizdaprasetya/patch-1

Add more Social Share links Addressing issue #608
This commit is contained in:
Shawn K 2018-10-08 02:05:35 -05:00 committed by GitHub
commit 12ca5b27e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 3 deletions

View file

@ -35,6 +35,7 @@
@import '~row/_row';
@import '~vertical-split/_vertical-split';
@import '~tooltip/_tooltip';
@import '~social-share-link/_social-share-link';
@import '~channel-claims-display/_channel-claims-display';
@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 SpaceBetween from '@components/SpaceBetween';
import SocialShareLink from '@components/SocialShareLink';
const AssetShareButtons = ({ host, name, shortId }) => {
return (
<SpaceBetween >
<SocialShareLink >
<a
className='link--primary'
target='_blank'
@ -32,7 +32,21 @@ const AssetShareButtons = ({ host, name, shortId }) => {
>
reddit
</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;