You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
729 B

  1. /* eslint react/prop-types: 0 */
  2. import React from "react";
  3. import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
  4. import { faFacebookSquare } from "@fortawesome/free-brands-svg-icons";
  5. const Facebook = props => {
  6. const handleClick = () => {
  7. const url =
  8. "https://www.facebook.com/sharer.php?u=" +
  9. props.url +
  10. "&t=" +
  11. props.title;
  12. window.open(
  13. url,
  14. "",
  15. "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=700"
  16. );
  17. };
  18. return (
  19. <button className={props.className} onClick={handleClick} type="button">
  20. <FontAwesomeIcon icon={faFacebookSquare} className="mr-2" />
  21. {props.text}
  22. </button>
  23. );
  24. };
  25. export default Facebook;
  26. //i