Skip to content

Instantly share code, notes, and snippets.

@dcortesnet
Created March 10, 2023 16:30
Show Gist options
  • Select an option

  • Save dcortesnet/187938b4bcba511128a50f86fb4cebfd to your computer and use it in GitHub Desktop.

Select an option

Save dcortesnet/187938b4bcba511128a50f86fb4cebfd to your computer and use it in GitHub Desktop.
Nextjs Whatsapp button component
import Image from "next/image";
export const WhatsappButton = () => {
return (
<div>
<a
href="https://wa.me/+56926339734"
style={{
position: "fixed",
width: "60px",
height: "60px",
bottom: "25px",
right: "35px",
textAlign: "center",
borderRadius: "50px",
boxShadow: "2px 2px 3px #999",
backgroundColor: "#25d366",
color: "white",
top: "46%",
zIndex: 9999999,
display: "flex",
justifyContent: "center",
alignItems: "center",
}}
target="_blank"
rel="noopener noreferrer"
>
<Image
src="/img/icon/whatsapp-64.png"
width={30}
height={30}
alt="whatsapp"
></Image>
</a>
</div>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment