.
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
import type { HTMLAttributes } from 'react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useTempoUi } from '@/components/tempo-brand';
|
||||
|
||||
export default function InputError({
|
||||
message,
|
||||
className = '',
|
||||
...props
|
||||
}: HTMLAttributes<HTMLParagraphElement> & { message?: string }) {
|
||||
const { t } = useTempoUi();
|
||||
return message ? (
|
||||
<p
|
||||
{...props}
|
||||
className={cn('text-sm text-red-600 dark:text-red-400', className)}
|
||||
>
|
||||
{message}
|
||||
{t(message)}
|
||||
</p>
|
||||
) : null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user