Skip to content

Commit 7b3f77e

Browse files
committed
feat(docs): make the registry content specific to react-native-reusables
1 parent fa69117 commit 7b3f77e

File tree

5 files changed

+66
-199
lines changed

5 files changed

+66
-199
lines changed

apps/docs/app/(home)/layout.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,6 @@ export default function Layout({ children }: { children: ReactNode }) {
6262
</Button>
6363
),
6464
},
65-
{
66-
type: 'custom',
67-
children: (
68-
<Button
69-
variant="ghost"
70-
size="sm"
71-
asChild
72-
className="hover:bg-fd-accent dark:hover:bg-fd-accent -ml-1.5 justify-start sm:ml-0 sm:justify-center">
73-
<Link href="/docs/registry">Registry</Link>
74-
</Button>
75-
),
76-
},
7765
]}>
7866
{children}
7967
</HomeLayout>

apps/docs/app/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ const SEARCH_OPTIONS = {
2424
['Installation', '/docs/installation'],
2525
['Customization', '/docs/customization'],
2626
['CLI', '/docs/cli'],
27-
['Registry', '/docs/registry'],
2827
['Changelog', '/docs/changelog'],
28+
['Components', '/docs/components/accordion'],
29+
['Blocks', '/docs/blocks/authentication'],
30+
['Create Your Registry', '/docs/create-your-registry'],
2931
] satisfies SearchLink[],
3032
};
3133

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Create Your Registry
3+
description: Host your own registry and allow others to add your code to their projects.
4+
---
5+
6+
import { Callout } from '@docs/components/callout';
7+
import { Step, Steps } from 'fumadocs-ui/components/steps';
8+
import Image from 'next/image';
9+
import { CommandTabs } from '@docs/components/command-tabs';
10+
11+
<figure className="flex flex-col">
12+
<Image
13+
src="/images/registry-light.png"
14+
width="1432"
15+
height="960"
16+
alt="Registry"
17+
className="w-full overflow-hidden rounded-lg border dark:hidden"
18+
/>
19+
<Image
20+
src="/images/registry-dark.png"
21+
width="1432"
22+
height="960"
23+
alt="Registry"
24+
className="hidden w-full overflow-hidden rounded-lg border shadow-sm dark:block"
25+
/>
26+
<figcaption className="text-center text-sm text-gray-500">
27+
A distribution system for code by shadcn
28+
</figcaption>
29+
</figure>
30+
31+
32+
## Getting started
33+
34+
To create your own registry, follow the official shadcn/ui [registry guide](https://ui.shadcn.com/docs/registry).
35+
36+
<Callout type="info" title="Community template">
37+
Kickstart your React Native Reusables registry using the [rnr-registry-template](https://github.com/gabimoncha/rnr-registry-template) by [@gabimoncha](https://github.com/gabimoncha).
38+
</Callout>
39+
40+
<div className="h-5" />
41+
42+
## Using React Native Reusables with your registry
43+
44+
To use React Native Reusables in your registry, add them as `registryDependencies` in your [`registry-item.json`](https://ui.shadcn.com/docs/registry/registry-item-json) files.
45+
46+
Instead of using short names like in the shadcn/ui registry, use the full URL of the React Native Reusables registry item:
47+
48+
```
49+
http://reactnativereusables.com/r/new-york/<COMPONENT_NAME>.json
50+
```
51+
52+
Replace `<COMPONENT_NAME>` with the component you want to install.
53+
54+
<div className="h-5" />
55+
56+
## Using the CLI
57+
58+
Once your registry is up and running, you can install components using the `add` command and the full URL of the registry item.
59+
60+
You can use either `shadcn` or `@react-native-reusables/cli`.
61+
62+
<CommandTabs args={["add", "http://localhost:3000/r/hello-world.json"]} />

apps/docs/content/docs/meta.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"!customization",
1111
"!cli",
1212
"!changelog",
13-
"!hire-us",
1413
"[BookOpen][Introduction](/docs)",
1514
"[FolderDown][Installation](/docs/installation)",
1615
"[FileSliders][Customization](/docs/customization)",
@@ -27,8 +26,7 @@
2726
"...",
2827
"------",
2928
"---Registry---",
30-
"!registry",
31-
".../registry",
29+
"create-your-registry",
3230
"------",
3331
"---About us---",
3432
"[FoundedLabs][Founded Labs](https://foundedlabs.com)"

apps/docs/content/docs/registry.mdx

Lines changed: 0 additions & 183 deletions
This file was deleted.

0 commit comments

Comments
 (0)