shoc-frontend-new/src/components/ui/form-error-message.tsx
Alexandre Brandizzi c68d47af7b
Some checks failed
CI / ci (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
chore: upgrade frontend dependencies (#24)
* chore: upgrade frontend application dependencies

* chore: upgrade frontend infrastructure dependencies

* fix: align lockfiles with CI npm

* fix: preserve ky error semantics

* fix: sanitize timeout error message
2026-07-14 21:35:59 -03:00

24 lines
746 B
TypeScript

import type { ComponentPropsWithoutRef } from "react";
import ErrorOutlineIcon from "@mui/icons-material/ErrorOutlined";
import { Typography } from "@mui/material";
import { cn } from "@/lib/utils";
export type FormErrorMessageProps = ComponentPropsWithoutRef<"div"> & {
message: string;
};
export function FormErrorMessage({ message, className, ...props }: FormErrorMessageProps) {
return (
<div className={cn("mt-0.5 flex items-center gap-1.5", className)} {...props}>
<ErrorOutlineIcon fontSize="small" color="error" />
<Typography
variant="caption"
color="error"
sx={{ fontFamily: "var(--font-sans)", fontSize: "var(--text-sm)" }}
>
{message}
</Typography>
</div>
);
}