From a8c10d34d63a0e37c83b14f133cdf71f4a2a097f Mon Sep 17 00:00:00 2001 From: rajun Date: Tue, 27 Oct 2026 16:28:52 +0530 Subject: [PATCH] feat: add logo tile --- app/components/ui/logo-tile.tsx | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 app/components/ui/logo-tile.tsx diff --git a/app/components/ui/logo-tile.tsx b/app/components/ui/logo-tile.tsx new file mode 100644 index 0000000..f1384cc --- /dev/null +++ b/app/components/ui/logo-tile.tsx @@ -0,0 +1,34 @@ +import type { ReactNode } from 'react'; +import { cva } from 'class-variance-authority'; +import { ClientLogo } from '~/components/ui/client-logo'; +import { cn } from '~/lib/utils'; +import type { BrandIdentity } from '~/types/project'; + +const tileVariants = cva('relative flex items-center justify-center overflow-hidden', { + variants: { + size: { + // Padding is the room around the logo, which fills the rest + card: 'h-[150px] w-full rounded-control p-6', + header: 'h-24 w-[200px] shrink-0 rounded-card px-6 py-4', + field: 'h-14 w-[120px] shrink-0 rounded-item p-2', + }, + background: { light: 'bg-logo-tile-light', dark: 'bg-logo-tile-dark' }, + }, +}); + +interface LogoTileProps { + brand: BrandIdentity; + size: 'card' | 'header' | 'field'; + className?: string; + children?: ReactNode; +} + +// The client logo on a tile coloured by the project's logo background (admin screens) +export function LogoTile({ brand, size, className, children }: LogoTileProps) { + return ( +
+ + {children} +
+ ); +}