Closed vincenzopuzio closed 7 months ago
You guys can just use your own Icon as children, this is using tailwindcss and my own icon is imported but this is basically the idea:
import { TwitterShareButton } from "react-share";
// import your X icon here
import { MyTwitterXIcon } from "../my-Icons-Path";
// then in your render
<TwitterShareButton url={'https://www.google.com/'}>
{ /* this is your own Icon you can do to match your styles, now an X */ }
<MyTwitterXIcon />
</TwitterShareButton>
At least in "react-share": "^4.4.0",
version you can, that's the one Im using
I really need this too! Tried your solution but didn't worked for me in react-share version 4.4.1
You guys can just use your own Icon as children, this is using tailwindcss and my own icon is imported but this is basically the idea:
import { TwitterShareButton } from "react-share"; // import your X icon here import { MyTwitterXIcon } from "../my-Icons-Path"; // then in your render <TwitterShareButton url={'https://www.google.com/'}> { /* this is your own Icon you can do to match your styles, now an X */ } <MyTwitterXIcon /> </TwitterShareButton>
At least in
"react-share": "^4.4.0",
version you can, that's the one Im using
Is there any other way to get the new logo updated? I need it Badly
Similar to @rolandin 's solution, here is mine:
import { TwitterShareButton } from "react-share";
import { Avatar } from "@material-ui/core";
return (
<TwitterShareButton>
<Avatar
style={{
width: size,
height: size,
backgroundColor: 'black',
}}
>
<i
className="fab fa-x-twitter"
style={{ fontSize: size * 0.6 }}
/>
</Avatar>
</TwitterShareButton>
)
@joeschneider32 Thanks for your solution. Do i need to install fontawesome node for that?
Still need to add X Icon to pack of available solutions for sharing in socials! Thank you!
Hey, XIcon
has been added in version 5
.
Thanks a lot!
I would also like the ability to use the new Twitter "X" logo if possible. Thanks! @nygardk