how do i add a tooltip that appears in place of <span…
- User
how do i add a tooltip that appears in place of {social.name}, the tooltip will show social.name using font size 14px and a border that is 1 px with color #f13024 and a background of color #0c0c0c. There should be a red triangle above the tooltip(part of it) pointing to the social icon. The tooltip should appear directly below the social icon hovered. import Link from "next/link";
import { RiYoutubeLine, RiInstagramLine, RiFacebookLine, RiDribbbleLine, RiGithubLine, RiPinterestLine, } from "react-icons/ri"; import { MdLocalPhone } from "react-icons/md";
export const socialData = [ { name: "YouTube", link: "https://youtube.com", Icon: RiYoutubeLine, }, { name: "Instagram", link: "https://instagram.com", Icon: RiInstagramLine, }, { name: "Facebook", link: "https://facebook.com", Icon: RiFacebookLine, }, { name: "Dribbble", link: "https://dribbble.com", Icon: RiDribbbleLine, }, { name: "Pinterest", link: "https://pinterest.com", Icon: RiPinterestLine, }, { name: "If unavailable on phone, email me or use whatsapp", link: "https://github.com/sanidhyy/modern-portfolio", Icon: MdLocalPhone, }, ];
const Socials = () => { return ( {socialData.map((social, i) => ( <Link key={i} title={social.name} href={social.link} target="_blank" rel="noreferrer noopener" className={
${ social.name === "If unavailable on phone, email me or use whatsapp" ? "bg-accent rounded-full p-[5px] hover:text-white" : "hover:text-accent" } transition-all duration-300} > <social.Icon aria-hidden /> {social.name} ))} ); };export default Socials;
- Assistant