mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-07 22:18:39 +00:00
* feat(www): add login blocks * chore(www): restructure for blocks * chore: build registry * chore: clean up chunks * fix(www): chart categories * feat(www): big registry refactor * feat(www): update blocks * feat: complex blocks * fix: update schema * feat: sync new-york and default * fix: lint * feat: move charts * fix(www): code * fix: src path * chore: rebuild registry * fix: screenshot * fix: set new-york as default
23 lines
575 B
TypeScript
23 lines
575 B
TypeScript
import { cn } from "@/registry/default/lib/utils"
|
|
|
|
export function ComponentWrapper({
|
|
className,
|
|
name,
|
|
children,
|
|
...props
|
|
}: React.ComponentPropsWithoutRef<"div"> & { name: string }) {
|
|
return (
|
|
<div
|
|
className={cn("flex w-full flex-col rounded-lg border", className)}
|
|
{...props}
|
|
>
|
|
<div className="border-b px-4 py-3">
|
|
<div className="text-sm font-medium">{name}</div>
|
|
</div>
|
|
<div className="flex flex-1 flex-col items-center justify-center gap-2 p-4 [&>div]:max-w-full">
|
|
{children}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|