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

export default forwardRef(FormItemEmail);
