CompareButton.jsx 511 B

123456789101112131415161718
  1. // components
  2. import {toast} from 'react-toastify';
  3. const CompareButton = ({isCartAction}) => {
  4. const handleClick = () => {
  5. toast.info('Product added to compare list');
  6. }
  7. return (
  8. <button className={isCartAction ? 'icon-btn icon-btn--cart' : ''}
  9. onClick={handleClick}
  10. aria-label="Add to compare list" style={{color: 'var(--nav-arrow)'}}>
  11. <i className="icon icon-compress text-16"/>
  12. </button>
  13. )
  14. }
  15. export default CompareButton