Files
Aut.ManagementFaculty/src/components/atoms/Heading.tsx
T
smhk1376andCursor 2b0db26a93
Deploy edu.mstaut.ir / deploy (push) Has been cancelled
Ship site UI checklist, move admin to /mstcontroller, and add safe taxonomy label migration.
Production already has migrations through 008; 009 only updates four seed labels by id. Faculty sync remains upsert-by-email/name and does not wipe curated data.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 16:26:21 +03:30

24 lines
878 B
TypeScript

import { cn } from "@/lib/utils";
/**
* Persian / Vazirmatn type scale.
* Avoid tracking-tight (hurts Arabic script). Keep clear step between levels.
* H1 hero → H2 sections → H3 cards/subheads → H4 small titles.
*/
const levels = {
1: "text-3xl font-bold leading-[1.35] text-pretty sm:text-4xl sm:leading-[1.3] lg:text-5xl lg:leading-[1.25]",
2: "text-2xl font-bold leading-[1.4] text-pretty sm:text-3xl sm:leading-[1.35]",
3: "text-xl font-semibold leading-[1.45]",
4: "text-lg font-semibold leading-[1.5]",
} as const;
type HeadingProps = React.ComponentProps<"h1"> & {
as?: "h1" | "h2" | "h3" | "h4";
level?: keyof typeof levels;
};
export function Heading({ as, level = 2, className, ...props }: HeadingProps) {
const Tag = as ?? (`h${level}` as "h1" | "h2" | "h3" | "h4");
return <Tag className={cn(levels[level], className)} {...props} />;
}