import { Input } from "antd";
import { MailFilled } from "@ant-design/icons";
import React, { forwardRef } from "react";
function FormItemEmail(props, ref) {
  return (
    <Input
      {...props}
      addonAfter={
        props.email ? (
          <a href={`mailto:${props.email}`}>
            <MailFilled />
          </a>
        ) : (
          <MailFilled />
        )
      }
    />
  );
}

export default forwardRef(FormItemEmail);
