2022-01-04 20:57:48 +00:00
|
|
|
export function TweetButton(props: { tweetText?: string }) {
|
|
|
|
const { tweetText } = props
|
|
|
|
|
|
|
|
return (
|
|
|
|
<a
|
2022-01-04 22:34:07 +00:00
|
|
|
className="btn btn-sm normal-case self-start border-none"
|
|
|
|
style={{ backgroundColor: '#1da1f2' }}
|
2022-01-04 22:09:03 +00:00
|
|
|
href={`https://twitter.com/intent/tweet?text=${encodeURIComponent(
|
2022-01-04 20:57:48 +00:00
|
|
|
tweetText ?? ''
|
|
|
|
)}`}
|
2022-01-04 22:34:07 +00:00
|
|
|
target="_blank"
|
2022-01-04 20:57:48 +00:00
|
|
|
>
|
2022-01-04 22:34:07 +00:00
|
|
|
<img
|
|
|
|
className="mr-2"
|
|
|
|
src={'/twitter-icon-white.svg'}
|
|
|
|
width={18}
|
|
|
|
height={18}
|
|
|
|
/>
|
2022-01-04 20:57:48 +00:00
|
|
|
Tweet
|
|
|
|
</a>
|
|
|
|
)
|
|
|
|
}
|