webapp/src/components/_shared/ShareModal/ShareModal.tsx
Ilya Y 0e6bb81b6a
Article action menu (#352)
* Article action menu
2024-01-05 22:31:28 +03:00

31 lines
746 B
TypeScript

import { useLocalize } from '../../../context/localize'
import { Modal } from '../../Nav/Modal'
import { Button } from '../Button'
import { ShareLinks } from '../ShareLinks'
import styles from '../ShareLinks/ShareLinks.module.scss'
type Props = {
modalTitle?: string
shareUrl?: string
title: string
imageUrl: string
description: string
}
export const ShareModal = (props: Props) => {
const { t } = useLocalize()
return (
<Modal name="share" variant="medium" allowClose={true}>
<h2>{t('Share publication')}</h2>
<ShareLinks
variant="inModal"
title={props.title}
shareUrl={props.shareUrl}
imageUrl={props.imageUrl}
description={props.description}
/>
</Modal>
)
}