UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

47 lines (46 loc) 1.49 kB
"use client"; import { jsx as x } from "react/jsx-runtime"; import { cn as a } from "../../lib/utils.js"; const i = { "hero-title": "text-5xl md:text-6xl font-extrabold leading-tight tracking-tight", title: "text-3xl md:text-4xl font-bold leading-snug", subtitle: "text-xl md:text-2xl font-semibold leading-snug text-d-secondary-foreground", body: "text-base md:text-lg font-normal leading-relaxed", "body-bold": "text-base md:text-lg font-semibold leading-relaxed", caption: "text-xs md:text-sm font-normal leading-tight text-d-secondary-foreground", overline: "text-xs uppercase tracking-widest font-medium text-d-secondary-foreground", button: "text-sm font-semibold uppercase tracking-wide", small: "text-xs font-normal leading-tight", h1: "text-4xl md:text-5xl font-extrabold leading-tight", h2: "text-3xl md:text-4xl font-bold leading-snug", h3: "text-2xl md:text-3xl font-semibold leading-snug", h4: "text-xl md:text-2xl font-semibold leading-snug", h5: "text-lg md:text-xl font-medium leading-snug" }, s = { "hero-title": "h1", title: "h2", subtitle: "h3", body: "p", "body-bold": "p", caption: "span", overline: "span", button: "span", small: "span", h1: "h1", h2: "h2", h3: "h3", h4: "h4", h5: "h5" }, r = ({ variant: t = "body", as: e, className: n, children: l, ...o }) => { const d = e || s[t] || "span"; return /* @__PURE__ */ x(d, { className: a(i[t], n), ...o, children: l }); }; export { r as Typo };