SPB Git

spb/spboucher.ai Public

spboucher.ai — personal website of Simon-Pierre Boucher.

TypeScript 93.4% HTML 5.5% CSS 1%
975 B · 39 lines tsx
Raw Blame History
1/*2  icon-tile.tsx3  spboucher.ai Web4  Author: Simon-Pierre Boucher5  Mail: contact@spboucher.ai6*/78import type { LucideIcon } from "lucide-react";910import { cn } from "@/lib/utils";1112const sizes = {13  sm: "h-8 w-8 rounded-[0.5rem] [&_svg]:h-3.5 [&_svg]:w-3.5",14  md: "h-10 w-10 rounded-[0.6rem] [&_svg]:h-4 [&_svg]:w-4",15  lg: "h-12 w-12 rounded-[0.7rem] [&_svg]:h-5 [&_svg]:w-5",16} as const;1718interface IconTileProps {19  icon: LucideIcon;20  size?: keyof typeof sizes;21  className?: string;22}2324/** A lucide icon set on a flat, hairline-ruled plate — quiet, editorial. */25export function IconTile({ icon: Icon, size = "md", className }: IconTileProps) {26  return (27    <span28      aria-hidden="true"29      className={cn(30        "inline-flex shrink-0 items-center justify-center border border-foreground/15 bg-card text-foreground/70 shadow-[var(--shadow-soft)]",31        sizes[size],32        className,33      )}34    >35      <Icon strokeWidth={1.5} />36    </span>37  );38}39