mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-08 14:35:09 +00:00
13 lines
1.7 KiB
JSON
13 lines
1.7 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "example",
|
|
"title": "Example",
|
|
"files": [
|
|
{
|
|
"path": "registry/base-lyra/components/example.tsx",
|
|
"content": "import { cn } from \"@/registry/base-lyra/lib/utils\"\n\nfunction ExampleWrapper({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div className=\"w-full bg-muted dark:bg-background\">\n <div\n data-slot=\"example-wrapper\"\n className={cn(\n \"mx-auto grid min-h-screen w-full max-w-5xl min-w-0 content-center items-start gap-8 p-4 pt-2 sm:gap-12 sm:p-6 md:grid-cols-2 md:gap-8 lg:p-12 2xl:max-w-6xl\",\n\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction Example({\n title,\n children,\n className,\n containerClassName,\n ...props\n}: React.ComponentProps<\"div\"> & {\n title?: string\n containerClassName?: string\n}) {\n return (\n <div\n data-slot=\"example\"\n className={cn(\n \"mx-auto flex w-full max-w-lg min-w-0 flex-col gap-1 self-stretch lg:max-w-none\",\n containerClassName\n )}\n {...props}\n >\n {title && (\n <div className=\"px-1.5 py-2 text-xs font-medium text-muted-foreground\">\n {title}\n </div>\n )}\n <div\n data-slot=\"example-content\"\n className={cn(\n \"flex min-w-0 flex-1 flex-col items-start gap-6 rounded-xl bg-card p-12 text-foreground *:[div:not([class*='w-'])]:w-full\",\n className\n )}\n >\n {children}\n </div>\n </div>\n )\n}\n\nexport { ExampleWrapper, Example }\n",
|
|
"type": "registry:component"
|
|
}
|
|
],
|
|
"type": "registry:component"
|
|
} |