import PropTypes from 'prop-types';
import './SocialButton.css';

export default function SocialButton({ provider, iconSrc, onClick }) {
  return (
    <button className="social-button" onClick={onClick} type="button">
      <span className="social-icon" aria-hidden>
        <img src={iconSrc} alt={`${provider} logosu`} />
      </span>
      <span>{provider} ile giris yap</span>
    </button>
  );
}

SocialButton.propTypes = {
  provider: PropTypes.string.isRequired,
  iconSrc: PropTypes.string.isRequired,
  onClick: PropTypes.func
};

SocialButton.defaultProps = {
  onClick: () => {}
};
