Skip to content

Instantly share code, notes, and snippets.

@Rantelo
Last active June 9, 2017 23:34
Show Gist options
  • Select an option

  • Save Rantelo/672bec78d9595e4a52a17eb98f413b73 to your computer and use it in GitHub Desktop.

Select an option

Save Rantelo/672bec78d9595e4a52a17eb98f413b73 to your computer and use it in GitHub Desktop.
Presentational Component v3
/**
* Social Media Login Button
*/
export const types = {
FACEBOOK: 'facebook',
GOOGLE: 'google',
EMAIL: 'email'
};
export const SocialMediaLogin = props => {
return (
<div className={`${props.type}-button`}>
<a className='WhiteText' href={`/auth/${props.type}`}>
{props.label}
</a>
<img className='social-logo' src={props.logo} />
</div>
);
}
SocialMediaLogin.defaultProps = {
type: types.EMAIL,
label: 'Login',
logo: require('images/email.svg')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment