2026-06-23 20:36:07 -04:00
|
|
|
import Link from "next/link"
|
2026-07-02 13:42:34 -04:00
|
|
|
import Image from "next/image"
|
2026-06-23 20:36:07 -04:00
|
|
|
import { cn } from "@/lib/utils"
|
|
|
|
|
|
|
|
|
|
type Size = "sm" | "md" | "lg"
|
2026-07-02 13:42:34 -04:00
|
|
|
type Theme = "light" | "dark"
|
2026-06-23 20:36:07 -04:00
|
|
|
|
2026-07-02 13:42:34 -04:00
|
|
|
// Wordmark lockup height per size — width follows the image's aspect ratio.
|
|
|
|
|
const WORDMARK_H: Record<Size, string> = {
|
|
|
|
|
sm: "h-6", // 24px
|
|
|
|
|
md: "h-7", // 28px
|
|
|
|
|
lg: "h-8", // 32px
|
2026-06-23 20:36:07 -04:00
|
|
|
}
|
|
|
|
|
|
2026-07-02 13:42:34 -04:00
|
|
|
// Square brand-mark box per size.
|
|
|
|
|
const MARK_BOX: Record<Size, string> = {
|
|
|
|
|
sm: "h-7 w-7",
|
|
|
|
|
md: "h-8 w-8",
|
|
|
|
|
lg: "h-9 w-9",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** The square brand mark (framework "monster") — used where space is tight, e.g. the collapsed sidebar. */
|
2026-06-23 20:36:07 -04:00
|
|
|
export function LogoMark({ size = "md", className }: { size?: Size; className?: string }) {
|
|
|
|
|
return (
|
2026-07-02 13:42:34 -04:00
|
|
|
<Image
|
|
|
|
|
src="/logo-mark.png"
|
|
|
|
|
alt="Property Management Network"
|
|
|
|
|
width={512}
|
|
|
|
|
height={512}
|
|
|
|
|
priority
|
|
|
|
|
className={cn("shrink-0 rounded-lg object-contain", MARK_BOX[size], className)}
|
|
|
|
|
/>
|
2026-06-23 20:36:07 -04:00
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-07-02 13:42:34 -04:00
|
|
|
* Full brand wordmark lockup (mark + "Property Management Network").
|
|
|
|
|
* `theme="light"` (default) renders the white wordmark for dark surfaces;
|
|
|
|
|
* `theme="dark"` renders the dark wordmark for light surfaces.
|
2026-06-23 20:36:07 -04:00
|
|
|
* Pass `href={null}` to render a non-link version.
|
|
|
|
|
*/
|
|
|
|
|
export function Logo({
|
|
|
|
|
size = "md",
|
2026-07-02 13:42:34 -04:00
|
|
|
theme = "light",
|
2026-06-23 20:36:07 -04:00
|
|
|
className,
|
|
|
|
|
href = "/",
|
|
|
|
|
}: {
|
|
|
|
|
size?: Size
|
2026-07-02 13:42:34 -04:00
|
|
|
theme?: Theme
|
2026-06-23 20:36:07 -04:00
|
|
|
className?: string
|
|
|
|
|
href?: string | null
|
|
|
|
|
}) {
|
2026-07-02 13:42:34 -04:00
|
|
|
const img = (
|
|
|
|
|
<Image
|
|
|
|
|
src={theme === "dark" ? "/logo-dark.png" : "/logo-light.png"}
|
|
|
|
|
alt="Property Management Network"
|
|
|
|
|
width={375}
|
|
|
|
|
height={40}
|
|
|
|
|
priority
|
|
|
|
|
className={cn("w-auto", WORDMARK_H[size])}
|
|
|
|
|
/>
|
2026-06-23 20:36:07 -04:00
|
|
|
)
|
|
|
|
|
|
2026-07-02 13:42:34 -04:00
|
|
|
const classes = cn("flex items-center", className)
|
2026-06-23 20:36:07 -04:00
|
|
|
|
|
|
|
|
return href ? (
|
2026-07-02 13:42:34 -04:00
|
|
|
<Link href={href} className={classes} aria-label="Property Management Network">
|
|
|
|
|
{img}
|
2026-06-23 20:36:07 -04:00
|
|
|
</Link>
|
|
|
|
|
) : (
|
2026-07-02 13:42:34 -04:00
|
|
|
<div className={classes}>{img}</div>
|
2026-06-23 20:36:07 -04:00
|
|
|
)
|
|
|
|
|
}
|