Last active
March 17, 2024 11:51
-
-
Save onesamket/9a40390d13f2df1ecfddc42cf52906dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ExclamationTriangleIcon } from "@radix-ui/react-icons"; | |
interface FormErrorProps { | |
message?: string; | |
}; | |
export const FormError = ({ | |
message, | |
}: FormErrorProps) => { | |
if (!message) return null; | |
return ( | |
<div className="bg-destructive/15 p-3 rounded-md flex items-center gap-x-2 text-sm text-destructive"> | |
<ExclamationTriangleIcon className="h-4 w-4" /> | |
<p>{message}</p> | |
</div> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment