import PropTypes from 'prop-types'
import { Typography, Flex, Button, Tooltip } from 'antd'
import NewMailIcon from '../../Icons/NewMailIcon'
// import CopyIcon from './CopyIcon'
import CopyButton from './CopyButton'
const { Text, Link } = Typography
const EmailDisplay = ({ email, showCopy = true, showLink = false }) => {
if (!email) return n/a
return (
<>
{showLink ? (
{email}
) : (
<>
{email}
}
type='text'
size='small'
style={{ minWidth: 25 }}
onClick={(e) => {
e.preventDefault()
window.location.href = `mailto:${email}`
}}
/>
>
)}
{showCopy && (
)}
>
)
}
EmailDisplay.propTypes = {
email: PropTypes.string,
showCopy: PropTypes.bool,
showLink: PropTypes.bool
}
export default EmailDisplay