The code powering m.abunchtell.com https://m.abunchtell.com
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

33 satır
777 B

  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import Link from 'react-router-dom/Link';
  4. const ColumnLink = ({ icon, text, to, href, method }) => {
  5. if (href) {
  6. return (
  7. <a href={href} className='column-link' data-method={method}>
  8. <i className={`fa fa-fw fa-${icon} column-link__icon`} />
  9. {text}
  10. </a>
  11. );
  12. } else {
  13. return (
  14. <Link to={to} className='column-link'>
  15. <i className={`fa fa-fw fa-${icon} column-link__icon`} />
  16. {text}
  17. </Link>
  18. );
  19. }
  20. };
  21. ColumnLink.propTypes = {
  22. icon: PropTypes.string.isRequired,
  23. text: PropTypes.string.isRequired,
  24. to: PropTypes.string,
  25. href: PropTypes.string,
  26. method: PropTypes.string,
  27. hideOnMobile: PropTypes.bool,
  28. };
  29. export default ColumnLink;