UNPKG

@base-framework/ui

Version:

This is a UI package that adds components and atoms that use Tailwind CSS and a theme based on Shadcn.

30 lines (29 loc) 1.08 kB
import { Div as r, H4 as s, P as c } from "@base-framework/atoms"; import { Atom as d } from "@base-framework/base"; const g = d((e, a) => { const l = e.margin ?? "my-5 mx-5", t = e.padding ?? "p-4", o = e.border ?? "border-border"; return e.hover && (e.class += " hover:shadow-lg hover:bg-muted/50"), r({ ...e, class: `rounded-lg ${o} bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${l} ${t} ${e.class || ""}` }, a); }), i = d((e, a) => { const l = e.border === !0 ? "border-t" : ""; return r({ ...e, class: `grid grid-cols-1 gap-y-4 sm:grid-cols-[1fr_2fr] sm:gap-x-6 pt-8 ${l} ${e.class || ""}` }, [ e.label && r({ ...e.labelProps, class: `flex flex-auto flex-col gap-y-1 ${e.labelProps?.class || ""}` }, [ s({ class: "text-base" }, e.label), e.description && c({ class: "text-sm text-muted-foreground" }, e.description) ]), // Controls container: grows to fill remaining space, spacing between items r({ class: "flex flex-col gap-y-4" }, a) ]); }); export { g as C, i as F };