Skip to content

Commit

Permalink
Add className prop support to <SocialLinks />
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Palmer committed Jan 23, 2017
1 parent 69f4bf3 commit 7ff85e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/SocialLinks/SocialLinks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import cx from 'classnames';

import templateHelper from '../../utils/templateHelper/templateHelper';
import Icon from '../Icon/Icon';
Expand All @@ -25,14 +26,15 @@ const SocialLinks = (props) => {
twitterVia,
accessibilityLabel,
platforms,
className,
} = props;

const encodedUri = encodeURI(uri);
const encodedTwitterTweet = encodeURI(twitterTweet);
const encodedVia = encodeURI(twitterVia);

return (
<div className={ css.root }>
<div className={ cx(css.root, className) }>
{ platforms
.map(platform => (
<div
Expand Down Expand Up @@ -68,6 +70,7 @@ SocialLinks.propTypes = {
name: PropTypes.string,
shareUrl: PropTypes.func,
})),
className: PropTypes.string,
};

SocialLinks.defaultProps = {
Expand Down

0 comments on commit 7ff85e1

Please sign in to comment.