|
| 1 | +import { lazy } from "react"; |
| 2 | + |
| 3 | +export const componentConfig = { |
| 4 | + registry: { |
| 5 | + "accordion-style-default": { |
| 6 | + name: "accordion-style-default", |
| 7 | + preview: lazy( |
| 8 | + () => import("@/preview/components/accordion-style-default") |
| 9 | + ), |
| 10 | + codeHtml: `<div class="space-y-4 mx-auto"> |
| 11 | + <details class="border-2 border-black shadow-md hover:shadow-sm transition-all overflow-hidden"> |
| 12 | + <summary class="px-4 py-2 font-head text-black cursor-pointer focus:outline-none"> |
| 13 | + Accordion Item 1 |
| 14 | + </summary> |
| 15 | + <div class="px-4 py-2 font-body bg-white text-gray-700"> |
| 16 | + This is the content of the first accordion item. It is styled with |
| 17 | + Tailwind CSS. |
| 18 | + </div> |
| 19 | + </details> |
| 20 | +
|
| 21 | + <details class="border-2 border-black shadow-md hover:shadow-sm transition-all overflow-hidden"> |
| 22 | + <summary class="px-4 py-2 font-head text-black cursor-pointer focus:outline-none"> |
| 23 | + Accordion Item 2 |
| 24 | + </summary> |
| 25 | + <div class="px-4 py-2 font-body bg-white text-gray-700"> |
| 26 | + This is the content of the second accordion item. It has a similar |
| 27 | + style to maintain consistency. |
| 28 | + </div> |
| 29 | + </details> |
| 30 | +
|
| 31 | + <details class="border-2 border-black shadow-md hover:shadow-sm transition-all overflow-hidden"> |
| 32 | + <summary class="px-4 py-2 font-head text-black cursor-pointer focus:outline-none"> |
| 33 | + Accordion Item 3 |
| 34 | + </summary> |
| 35 | + <div class="px-4 py-2 font-body bg-white text-gray-700"> |
| 36 | + This is the content of the third accordion item. The details element |
| 37 | + handles the toggle behavior. |
| 38 | + </div> |
| 39 | + </details> |
| 40 | +</div>`, |
| 41 | + }, |
| 42 | + "avatar-style-round": { |
| 43 | + name: "avatar-style-round", |
| 44 | + preview: lazy(() => import("@/preview/components/avatar-style-round")), |
| 45 | + codeHtml: `<div className="inline-block w-14 h-14 border-2 border-black rounded-full overflow-hidden"> |
| 46 | + <img |
| 47 | + className="w-full h-full" |
| 48 | + src="https://pagedone.io/asset/uploads/1704275541.png" |
| 49 | + alt="Rounded Avatar" |
| 50 | + /> |
| 51 | +</div>`, |
| 52 | + }, |
| 53 | + "badge-style-default": { |
| 54 | + name: "badge-style-default", |
| 55 | + preview: lazy(() => import("@/preview/components/badge-style-default")), |
| 56 | + codeHtml: `<span className="border-black text-black border-2 px-2 py-1 text-sm"> |
| 57 | + Badge |
| 58 | +</span>`, |
| 59 | + }, |
| 60 | + "button-style-default": { |
| 61 | + name: "button-style-default", |
| 62 | + preview: lazy(() => import("@/preview/components/badge-style-default")), |
| 63 | + codeHtml: `<button className="bg-primary-400 text-black px-6 py-2 text-base font-head border-2 border-black shadow-md hover:shadow-xs hover:bg-primary-500 transition-all"> |
| 64 | + Click Me! |
| 65 | +</button>`, |
| 66 | + }, |
| 67 | + "card-style-default": { |
| 68 | + name: "card-style-default", |
| 69 | + preview: lazy(() => import("@/preview/components/card-style-default")), |
| 70 | + codeHtml: `<div className="inline-block border-2 border-black p-4 shadow-md cursor-pointer transition-all hover:shadow-xs"> |
| 71 | + <h4 className="font-head text-2xl font-medium mb-1">This is card Title</h4> |
| 72 | + <p>This is card description.</p> |
| 73 | +</div>`, |
| 74 | + }, |
| 75 | + "input-style-default": { |
| 76 | + name: "input-style-default", |
| 77 | + preview: lazy(() => import("@/preview/components/input-style-default")), |
| 78 | + codeHtml: `<input |
| 79 | + type="text" |
| 80 | + placeholder="type something..." |
| 81 | + className="px-4 py-2 w-full border-2 border-black shadow-md transition focus:outline-none focus:shadow-xs" |
| 82 | +/>`, |
| 83 | + }, |
| 84 | + }, |
| 85 | +}; |
0 commit comments