2022-08-29 15:06:17 +00:00
|
|
|
import { Modal } from './layout/modal'
|
|
|
|
import { Col } from './layout/col'
|
|
|
|
import { Title } from './title'
|
|
|
|
import { TweetButton } from './tweet-button'
|
2022-10-05 13:55:46 +00:00
|
|
|
import { CopyLinkButton } from './copy-link-button'
|
2022-08-29 15:06:17 +00:00
|
|
|
|
|
|
|
export function SharePostModal(props: {
|
|
|
|
shareUrl: string
|
|
|
|
isOpen: boolean
|
|
|
|
setOpen: (open: boolean) => void
|
|
|
|
}) {
|
|
|
|
const { isOpen, setOpen, shareUrl } = props
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Modal open={isOpen} setOpen={setOpen} size="md">
|
|
|
|
<Col className="gap-4 rounded bg-white p-4">
|
|
|
|
<Title className="!mt-0 !mb-2" text="Share this post" />
|
2022-10-05 13:55:46 +00:00
|
|
|
<CopyLinkButton url={shareUrl} tracking="copy share post link" />
|
2022-10-05 22:51:10 +00:00
|
|
|
<div className="self-center">
|
|
|
|
<TweetButton tweetText={shareUrl} />
|
|
|
|
</div>
|
2022-08-29 15:06:17 +00:00
|
|
|
</Col>
|
|
|
|
</Modal>
|
|
|
|
)
|
|
|
|
}
|