공통코드 관리 시스템 개선 완료
This commit is contained in:
23
frontend/components/common/ValidationMessage.tsx
Normal file
23
frontend/components/common/ValidationMessage.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import React from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface ValidationMessageProps {
|
||||
message?: string;
|
||||
isValid?: boolean;
|
||||
isLoading?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function ValidationMessage({ message, isValid, isLoading, className }: ValidationMessageProps) {
|
||||
if (isLoading) {
|
||||
return <p className={cn("text-sm text-gray-500", className)}>검사 중...</p>;
|
||||
}
|
||||
|
||||
if (!message) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<p className={cn("text-sm transition-colors", isValid ? "text-green-600" : "text-red-600", className)}>{message}</p>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user