mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-04 04:23:13 +00:00
* 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
24 lines
746 B
TypeScript
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>
|
|
);
|
|
}
|