Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(blocks): faq #6433

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/www/__registry__/default/blocks/faq-01/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FAQ } from "@/registry/default/blocks/faq-01/components/faq"

export default function Page() {
return (
<div className="flex min-h-svh flex-col">
<FAQ />
</div>
)
}
9 changes: 9 additions & 0 deletions apps/www/__registry__/default/blocks/faq-02/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FAQ } from "@/registry/default/blocks/faq-02/components/faq"

export default function Page() {
return (
<div className="flex min-h-svh flex-col">
<FAQ />
</div>
)
}
9 changes: 9 additions & 0 deletions apps/www/__registry__/default/blocks/faq-03/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FAQ } from "@/registry/default/blocks/faq-03/components/faq"

export default function Page() {
return (
<div className="flex min-h-svh flex-col">
<FAQ />
</div>
)
}
9 changes: 9 additions & 0 deletions apps/www/__registry__/default/blocks/faq-04/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FAQ } from "@/registry/default/blocks/faq-04/components/faq"

export default function Page() {
return (
<div className="flex min-h-svh flex-col">
<FAQ />
</div>
)
}
9 changes: 9 additions & 0 deletions apps/www/__registry__/default/blocks/faq-05/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FAQ } from "@/registry/default/blocks/faq-05/components/faq"

export default function Page() {
return (
<div className="flex min-h-svh flex-col">
<FAQ />
</div>
)
}
9 changes: 9 additions & 0 deletions apps/www/__registry__/default/blocks/faq-06/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FAQ } from "@/registry/default/blocks/faq-06/components/faq"

export default function Page() {
return (
<div className="flex min-h-svh flex-col">
<FAQ />
</div>
)
}
228 changes: 228 additions & 0 deletions apps/www/__registry__/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,120 @@ export const Index: Record<string, any> = {
source: "__registry__/new-york/blocks/login-05/page.tsx",
meta: undefined,
},
"faq-01": {
name: "faq-01",
description: "Offset with supporting text",
type: "registry:block",
registryDependencies: ["accordion","button"],
files: [{
path: "registry/new-york/blocks/faq-01/page.tsx",
type: "registry:page",
target: "app/faq/page.tsx"
},{
path: "registry/new-york/blocks/faq-01/components/faq.tsx",
type: "registry:component",
target: ""
}],
categories: ["faq"],
component: React.lazy(() => import("@/registry/new-york/blocks/faq-01/page.tsx")),
source: "__registry__/new-york/blocks/faq-01/page.tsx",
meta: undefined,
},
"faq-02": {
name: "faq-02",
description: "Accordion with shadowed blocks",
type: "registry:block",
registryDependencies: ["accordion"],
files: [{
path: "registry/new-york/blocks/faq-02/page.tsx",
type: "registry:page",
target: "app/faq/page.tsx"
},{
path: "registry/new-york/blocks/faq-02/components/faq.tsx",
type: "registry:component",
target: ""
}],
categories: ["faq"],
component: React.lazy(() => import("@/registry/new-york/blocks/faq-02/page.tsx")),
source: "__registry__/new-york/blocks/faq-02/page.tsx",
meta: undefined,
},
"faq-03": {
name: "faq-03",
description: "Centered accordion with groups",
type: "registry:block",
registryDependencies: ["accordion","button"],
files: [{
path: "registry/new-york/blocks/faq-03/page.tsx",
type: "registry:page",
target: "app/faq/page.tsx"
},{
path: "registry/new-york/blocks/faq-03/components/faq.tsx",
type: "registry:component",
target: ""
}],
categories: ["faq"],
component: React.lazy(() => import("@/registry/new-york/blocks/faq-03/page.tsx")),
source: "__registry__/new-york/blocks/faq-03/page.tsx",
meta: undefined,
},
"faq-04": {
name: "faq-04",
description: "Accordion with sidebar groups",
type: "registry:block",
registryDependencies: ["accordion"],
files: [{
path: "registry/new-york/blocks/faq-04/page.tsx",
type: "registry:page",
target: "app/faq/page.tsx"
},{
path: "registry/new-york/blocks/faq-04/components/faq.tsx",
type: "registry:component",
target: ""
}],
categories: ["faq"],
component: React.lazy(() => import("@/registry/new-york/blocks/faq-04/page.tsx")),
source: "__registry__/new-york/blocks/faq-04/page.tsx",
meta: undefined,
},
"faq-05": {
name: "faq-05",
description: "Accordion with centered block",
type: "registry:block",
registryDependencies: ["accordion"],
files: [{
path: "registry/new-york/blocks/faq-05/page.tsx",
type: "registry:page",
target: "app/faq/page.tsx"
},{
path: "registry/new-york/blocks/faq-05/components/faq.tsx",
type: "registry:component",
target: ""
}],
categories: ["faq"],
component: React.lazy(() => import("@/registry/new-york/blocks/faq-05/page.tsx")),
source: "__registry__/new-york/blocks/faq-05/page.tsx",
meta: undefined,
},
"faq-06": {
name: "faq-06",
description: "Centered accordion",
type: "registry:block",
registryDependencies: ["accordion","input"],
files: [{
path: "registry/new-york/blocks/faq-06/page.tsx",
type: "registry:page",
target: "app/faq/page.tsx"
},{
path: "registry/new-york/blocks/faq-06/components/faq.tsx",
type: "registry:component",
target: ""
}],
categories: ["faq"],
component: React.lazy(() => import("@/registry/new-york/blocks/faq-06/page.tsx")),
source: "__registry__/new-york/blocks/faq-06/page.tsx",
meta: undefined,
},
"chart-area-axes": {
name: "chart-area-axes",
description: "",
Expand Down Expand Up @@ -6489,6 +6603,120 @@ export const Index: Record<string, any> = {
source: "__registry__/default/blocks/login-05/page.tsx",
meta: undefined,
},
"faq-01": {
name: "faq-01",
description: "Offset with supporting text",
type: "registry:block",
registryDependencies: ["accordion","button"],
files: [{
path: "registry/default/blocks/faq-01/page.tsx",
type: "registry:page",
target: "app/faq/page.tsx"
},{
path: "registry/default/blocks/faq-01/components/faq.tsx",
type: "registry:component",
target: ""
}],
categories: ["faq"],
component: React.lazy(() => import("@/registry/default/blocks/faq-01/page.tsx")),
source: "__registry__/default/blocks/faq-01/page.tsx",
meta: undefined,
},
"faq-02": {
name: "faq-02",
description: "Accordion with shadowed blocks",
type: "registry:block",
registryDependencies: ["accordion"],
files: [{
path: "registry/default/blocks/faq-02/page.tsx",
type: "registry:page",
target: "app/faq/page.tsx"
},{
path: "registry/default/blocks/faq-02/components/faq.tsx",
type: "registry:component",
target: ""
}],
categories: ["faq"],
component: React.lazy(() => import("@/registry/default/blocks/faq-02/page.tsx")),
source: "__registry__/default/blocks/faq-02/page.tsx",
meta: undefined,
},
"faq-03": {
name: "faq-03",
description: "Centered accordion with groups",
type: "registry:block",
registryDependencies: ["accordion","button"],
files: [{
path: "registry/default/blocks/faq-03/page.tsx",
type: "registry:page",
target: "app/faq/page.tsx"
},{
path: "registry/default/blocks/faq-03/components/faq.tsx",
type: "registry:component",
target: ""
}],
categories: ["faq"],
component: React.lazy(() => import("@/registry/default/blocks/faq-03/page.tsx")),
source: "__registry__/default/blocks/faq-03/page.tsx",
meta: undefined,
},
"faq-04": {
name: "faq-04",
description: "Accordion with sidebar groups",
type: "registry:block",
registryDependencies: ["accordion"],
files: [{
path: "registry/default/blocks/faq-04/page.tsx",
type: "registry:page",
target: "app/faq/page.tsx"
},{
path: "registry/default/blocks/faq-04/components/faq.tsx",
type: "registry:component",
target: ""
}],
categories: ["faq"],
component: React.lazy(() => import("@/registry/default/blocks/faq-04/page.tsx")),
source: "__registry__/default/blocks/faq-04/page.tsx",
meta: undefined,
},
"faq-05": {
name: "faq-05",
description: "Accordion with centered block",
type: "registry:block",
registryDependencies: ["accordion"],
files: [{
path: "registry/default/blocks/faq-05/page.tsx",
type: "registry:page",
target: "app/faq/page.tsx"
},{
path: "registry/default/blocks/faq-05/components/faq.tsx",
type: "registry:component",
target: ""
}],
categories: ["faq"],
component: React.lazy(() => import("@/registry/default/blocks/faq-05/page.tsx")),
source: "__registry__/default/blocks/faq-05/page.tsx",
meta: undefined,
},
"faq-06": {
name: "faq-06",
description: "Centered accordion",
type: "registry:block",
registryDependencies: ["accordion","input"],
files: [{
path: "registry/default/blocks/faq-06/page.tsx",
type: "registry:page",
target: "app/faq/page.tsx"
},{
path: "registry/default/blocks/faq-06/components/faq.tsx",
type: "registry:component",
target: ""
}],
categories: ["faq"],
component: React.lazy(() => import("@/registry/default/blocks/faq-06/page.tsx")),
source: "__registry__/default/blocks/faq-06/page.tsx",
meta: undefined,
},
"chart-area-axes": {
name: "chart-area-axes",
description: "",
Expand Down
9 changes: 9 additions & 0 deletions apps/www/__registry__/new-york/blocks/faq-01/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FAQ } from "@/registry/new-york/blocks/faq-01/components/faq"

export default function Page() {
return (
<div className="flex min-h-svh flex-col">
<FAQ />
</div>
)
}
9 changes: 9 additions & 0 deletions apps/www/__registry__/new-york/blocks/faq-02/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FAQ } from "@/registry/new-york/blocks/faq-02/components/faq"

export default function Page() {
return (
<div className="flex min-h-svh flex-col">
<FAQ />
</div>
)
}
9 changes: 9 additions & 0 deletions apps/www/__registry__/new-york/blocks/faq-03/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FAQ } from "@/registry/new-york/blocks/faq-03/components/faq"

export default function Page() {
return (
<div className="flex min-h-svh flex-col">
<FAQ />
</div>
)
}
9 changes: 9 additions & 0 deletions apps/www/__registry__/new-york/blocks/faq-04/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FAQ } from "@/registry/new-york/blocks/faq-04/components/faq"

export default function Page() {
return (
<div className="flex min-h-svh flex-col">
<FAQ />
</div>
)
}
9 changes: 9 additions & 0 deletions apps/www/__registry__/new-york/blocks/faq-05/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FAQ } from "@/registry/new-york/blocks/faq-05/components/faq"

export default function Page() {
return (
<div className="flex min-h-svh flex-col">
<FAQ />
</div>
)
}
9 changes: 9 additions & 0 deletions apps/www/__registry__/new-york/blocks/faq-06/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FAQ } from "@/registry/new-york/blocks/faq-06/components/faq"

export default function Page() {
return (
<div className="flex min-h-svh flex-col">
<FAQ />
</div>
)
}
28 changes: 28 additions & 0 deletions apps/www/public/r/styles/default/faq-01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "faq-01",
"type": "registry:block",
"author": "shadcn (https://ui.shadcn.com)",
"description": "Offset with supporting text",
"registryDependencies": [
"accordion",
"button"
],
"files": [
{
"path": "blocks/faq-01/page.tsx",
"content": "import { FAQ } from \"@/registry/default/blocks/faq-01/components/faq\"\n\nexport default function Page() {\n return (\n <div className=\"flex min-h-svh flex-col\">\n <FAQ />\n </div>\n )\n}\n",
"type": "registry:page",
"target": "app/faq/page.tsx"
},
{
"path": "blocks/faq-01/components/faq.tsx",
"content": "import {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from \"@/registry/default/ui/accordion\"\nimport { Button } from \"@/registry/default/ui/button\"\n\nconst items = [\n {\n label: \"What is the Force?\",\n content:\n \"The Force is a mystical energy field that binds the galaxy together.\",\n value: \"item-1\",\n },\n {\n label: \"Who are the Jedi and what is their purpose?\",\n content:\n \"The Jedi are peacekeepers of the galaxy who use the Force for good. Their purpose is to protect and maintain peace.\",\n value: \"item-2\",\n },\n {\n label: \"Who are the Sith and what are their goals?\",\n content:\n \"The Sith are followers of the dark side who seek power and control. Their ultimate goal is to dominate the galaxy.\",\n value: \"item-3\",\n },\n {\n label: \"Yoda, who is?\",\n content:\n \"A wise and powerful Jedi Master, Yoda is. Trained many Jedi, he has.\",\n value: \"item-4\",\n },\n {\n label: \"What is the Death Star?\",\n content:\n \"The Death Star is a massive space station and superweapon capable of destroying planets.\",\n value: \"item-5\",\n },\n {\n label: \"What is the Millennium Falcon?\",\n content:\n \"The Millennium Falcon is a legendary starship flown by Han Solo and Chewbacca.\",\n value: \"item-6\",\n },\n]\n\nexport function FAQ() {\n return (\n <div className=\"flex flex-col bg-background p-6 md:p-10\">\n <h2 className=\"font-medium text-4xl pb-3 lg:pb-14 lg:text-[4rem] lg:leading-[4.5rem]\">\n FAQ\n </h2>\n <div className=\"flex flex-col-reverse items-start lg:grid-cols-[max-content_1fr] gap-9 lg:grid lg:gap-6\">\n <div className=\"pt-6 p-8 bg-muted w-full lg:w-auto lg:min-w-96\">\n <h3 className=\"font-medium text-3xl pb-4\">still need help?</h3>\n <p className=\"pb-10 text-base lg:text-lg\">\n Chat to us&nbsp;—\n <br />\n we'll&nbsp;respond as&nbsp;soon&nbsp;a&nbsp;possible.\n </p>\n <Button tabIndex={-1}>Ask question</Button>\n </div>\n <Accordion\n type=\"single\"\n collapsible\n className=\"w-full gap-y-2 flex flex-col\"\n >\n {items.map((item) => (\n <AccordionItem\n key={item.value}\n value={item.value}\n className=\"group/item border border-foreground transition bg-foreground hover:bg-background data-[state=open]:bg-background\"\n >\n <AccordionTrigger className=\"font-medium text-xl lg:text-3xl text-primary-foreground p-4 lg:p-6 lg:pl-10 group-hover/item:text-primary group-hover/item:no-underline data-[state=open]:text-primary [&>svg]:h-7 [&>svg]:w-7 [&>svg]:text-primary-foreground group-hover/item:[&>svg]:text-primary [&[data-state=open]>svg]:text-primary\">\n {item.label}\n </AccordionTrigger>\n <AccordionContent className=\"text-sm px-4 pb-8 lg:px-10 lg:pb-10 lg:text-lg\">\n {item.content}\n </AccordionContent>\n </AccordionItem>\n ))}\n </Accordion>\n </div>\n </div>\n )\n}\n",
"type": "registry:component",
"target": ""
}
],
"categories": [
"faq"
]
}
Loading