Skip to content

Commit dda5077

Browse files
authored
feat(separator): add 8-bit separator component with styling and registry entry (#353)
1 parent be93e23 commit dda5077

File tree

4 files changed

+122
-62
lines changed

4 files changed

+122
-62
lines changed

public/r/command.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
"type": "registry:component",
1515
"target": "components/ui/8bit/command.tsx"
1616
},
17+
{
18+
"path": "components/ui/8bit/separator.tsx",
19+
"content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator-root\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"data-[orientation=horizontal]:bg-[length:16px_8px] data-[orientation=horizontal]:bg-[linear-gradient(90deg,var(--foreground)_75%,transparent_75%)] dark:data-[orientation=horizontal]:bg-[linear-gradient(90deg,var(--ring)_75%,transparent_75%)] shrink-0 data-[orientation=horizontal]:h-0.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-0.5 data-[orientation=vertical]:bg-[length:2px_16px] data-[orientation=vertical]:bg-[linear-gradient(0deg,var(--foreground)_75%,transparent_75%)] dark:data-[orientation=vertical]:bg-[linear-gradient(0deg,var(--ring)_75%,transparent_75%)]\",\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n",
20+
"type": "registry:component",
21+
"target": "components/ui/8bit/separator.tsx"
22+
},
1723
{
1824
"path": "components/ui/8bit/styles/retro.css",
1925
"content": "@import url(\"https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap\");\n\n.retro {\n font-family:\n \"Press Start 2P\",\n system-ui,\n -apple-system,\n sans-serif;\n line-height: 1.5;\n letter-spacing: 0.5px;\n}\n",

0 commit comments

Comments
 (0)