Sweet Alert

  • SweetAlert is known for its ability to create attractive and customizable modal dialogs, enhancing the user experience with visually appealing notifications and alerts in web applications. For more details
  • Installation
    npm i @sweetalert/with-react
    Script
    import Swal from "sweetalert2";
    import "sweetalert2/src/sweetalert2.scss";
            
    const swwetAleart = memo(() => {
    const cartSwal = () => {
        Swal.fire({
          title: `${t("sweetalert.added")}`,
          text: `${t("sweetalert.added_to_cart")}`,
          icon: "success",
          confirmButtonText: `${t("sweetalert.ok_btn")}`,
          background: "#141314",
          color: "#ffffff",
          });
      };
    retutn(
      <>
          <div className="iq-button">
            <Link
              to="#"
              className="btn btn-sm cart-btn text-uppercase position-relative"
              onClick={cartSwal}
            >
            <span className="button-text">
              {t("shop.add_to_cart")}
            </span>
            <i className="fa-solid fa-play"></i>
            </Link>
          </div>
      </>
      )
      }