couetilc / react-social-icons

svg social icons in react

Home Page:https://react-social-icons.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docs: target _blank

Vandivier opened this issue · comments

I naively tried target="_blank" and it worked fine although i didn't see that was possible based on demo site or README

great library!

can I see demo example how you solve it?

@rajviahmedtamim consider this excerpt from my open source app not-johns-linktree:

import { FunctionComponent } from "react";
import { SocialIcon, SocialIconProps } from "react-social-icons";

import styles from "./Socials.module.css";

const StyledSocialIcon: FunctionComponent<SocialIconProps> = (props) => (
  <SocialIcon
    {...props}
    style={{ height: "2rem", margin: ".25rem", width: "2rem" }}
  />
);

export const Socials = () => (
  <ul className={styles["social-list-wrapper"]}>
    <li>
      <StyledSocialIcon
        url="https://twitter.com/johnvandivier"
        target="_blank"
      />
    </li>
    <li>
      <StyledSocialIcon
        url="https://www.youtube.com/c/JohnVandivier"
        target="_blank"
      />
    </li>
    <li>
      <StyledSocialIcon url="mailto:john@ladderly.io" target="_blank" />
    </li>
  </ul>
);