Closed Vandivier closed 1 year ago
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>
);
thank you @Vandivier, this question is now addressed in the README: https://github.com/couetilc/react-social-icons#how-do-i-open-the-link-in-a-new-tab-when-the-icon-is-clicked
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!