Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8915d9f

Browse files
authoredFeb 5, 2025
feat: use new shadcn registry (magicuidesign#525)
* feat: use new shadcn registry * fix: get previews working * fix: update titles and descriptions * fix: update titles and descriptions * fix: update packages * fix: typecheck * fix: update contributing * fix: update component
1 parent 6dc23c7 commit 8915d9f

File tree

394 files changed

+11419
-11355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

394 files changed

+11419
-11355
lines changed
 

‎CONTRIBUTING.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ To add a new component to MagicUI, you will need to modify several files. Follow
5454

5555
### 1. Create Component
5656

57-
Create the main component in `registry/default/magicui/example-component.tsx`
57+
Create the main component in `registry/magicui/example-component.tsx`
5858

5959
```typescript
6060
import React from 'react'
@@ -70,10 +70,10 @@ export default function ExampleComponent() {
7070

7171
### 2. Create Component Demo
7272

73-
Provide a basic example to showcase your component in `registry/default/example/example-component-demo.tsx`
73+
Provide a basic example to showcase your component in `registry/example/example-component-demo.tsx`
7474

7575
```typescript
76-
import ExampleComponent from '@/registry/default/magicui/example-component'
76+
import ExampleComponent from '@/registry/magicui/example-component'
7777

7878
export default function ExampleComponentDemo() {
7979
return (
@@ -160,8 +160,10 @@ export const ui: Registry = [
160160
// ... existing components ...
161161
{
162162
name: "example-component",
163+
description: "A component that does something",
163164
type: "registry:ui",
164-
files: ["magicui/example-component.tsx"],
165+
dependencies: ["motion"],
166+
files: [{ path: "magicui/example-component.tsx", type: "registry:ui" }],
165167
// Add any dependencies or tailwind configurations if needed
166168
},
167169
];
@@ -174,9 +176,15 @@ export const examples: Registry = [
174176
// ... existing examples ...
175177
{
176178
name: "example-component-demo",
179+
description: "An example of the example-component",
177180
type: "registry:example",
178181
registryDependencies: ["example-component"],
179-
files: ["example/example-component-demo.tsx"],
182+
files: [
183+
{
184+
path: "registry/example/example-component-demo.tsx",
185+
type: "registry:example",
186+
},
187+
],
180188
},
181189
];
182190
```

0 commit comments

Comments
 (0)
Please sign in to comment.