import React, { Component } from 'react';
import './index.styl';
import googleIcon from '../../../public//img/icons/google.svg';
import facebookIcon from '../../../public//img/icons/facebook.svg';
class MainButton extends Component {
render () {
const {
text = '',
onClick = () => { },
disabled = false,
type = ''
} = this.props;
const className =
type === 'google' ? 'main-button__google' :
type === 'facebook' ? 'main-button__facebook' :
'main-button__default';
const img =
type === 'google' ?
<embed className="main-button__icon" src={ googleIcon } alt={ 'fecebook logo' } /> :
type === 'facebook' ?
<embed className="main-button__icon" src={ facebookIcon } alt={ 'fecebook logo' } /> :
null;
return (
<button className={ `main-button ${className}` } disabled={ disabled } onClick={ onClick }>
{ img }
{ text }
</button>
);
}
}
export default MainButton;