import { AlertCircle } from 'lucide-react'

interface Props {
  error: string
}

const FieldError = (props: Props) => {
  const { error } = props

  return (
    <>
      <AlertCircle className="text-red-500 absolute right-2 top-1/2 -translate-y-1/2 w-6 h-6" />
      <p className="absolute top-full text-xs text-red-500 mt-0.5 font-medium">
        {error}
      </p>
    </>
  )
}

export default FieldError
