NEW_CPM/resources/js/components/input-error.tsx
2025-04-02 17:49:09 +05:45

11 lines
382 B
TypeScript

import { cn } from '@/lib/utils';
import { type HTMLAttributes } from 'react';
export default function InputError({ message, className = '', ...props }: HTMLAttributes<HTMLParagraphElement> & { message?: string }) {
return message ? (
<p {...props} className={cn('text-sm text-red-600 dark:text-red-400', className)}>
{message}
</p>
) : null;
}