diff --git a/README.md b/README.md index 7627987..b763748 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,23 @@ Open UI is a powerful design system created with Shadcn UI and Tailwind CSS. It ## Components +_General_ + +- [x] Button +- [x] Aspect Ratio +- [x] Carousel + +_Data Input_ + +- [x] Input +- [x] Label +- [x] Select +- [x] Checkbox - [x] Slider _Layout_ -- [x] Divider +- [x] Separator _Display_ @@ -23,7 +35,6 @@ _Display_ - [x] Avatar - [x] Accordion - [x] Alert -- [x] Alert Dialog - [x] Badge - [x] Tooltips - [x] Tables @@ -50,4 +61,4 @@ If you want to know more about this design system visit ## License -[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)) +[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) diff --git a/apps/web/app/(docs)/docs/[[...slug]]/page.tsx b/apps/web/app/(docs)/docs/[[...slug]]/page.tsx index 2a2559a..f1e0d14 100644 --- a/apps/web/app/(docs)/docs/[[...slug]]/page.tsx +++ b/apps/web/app/(docs)/docs/[[...slug]]/page.tsx @@ -74,8 +74,8 @@ export default async function DocPage({ params }: DocPageProps) {
-
-
+
+
diff --git a/apps/web/app/faq/page.tsx b/apps/web/app/faq/page.tsx index b142bda..6d2f09d 100644 --- a/apps/web/app/faq/page.tsx +++ b/apps/web/app/faq/page.tsx @@ -1,7 +1,33 @@ -export default function BlogPage() { +import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@openui-org/react' +import { FAQs } from '@/constants/faqs' + +export default function Page() { return ( -
-

Blog

-
+ <> +
+
+
+

Frequently Asked Questions

+

+ Get answers to your questions about our design system. Explore our guidelines, component usage, and more. +

+
+
+
+
+ + {FAQs.map((faq, index) => ( + + + {faq.question} + + + {faq.answer} + + + ))} + +
+ ) } diff --git a/apps/web/components/sidebar-nav.tsx b/apps/web/components/sidebar-nav.tsx index 8003771..46114ce 100644 --- a/apps/web/components/sidebar-nav.tsx +++ b/apps/web/components/sidebar-nav.tsx @@ -1,6 +1,7 @@ 'use client' import Link from 'next/link' +import { Button } from '@openui-org/react' import type { NavItem } from './main-nav' export type SidebarNavItem = { @@ -25,16 +26,14 @@ export interface DocsSidebarNavProps { export function DocsSidebarNav({ items }: DocsSidebarNavProps) { return items.length ? ( -
+
{items.map((item, index) => (

{item.title}

{item.items - ? ( - - ) + ? () : null}
))} @@ -50,17 +49,18 @@ interface DocsSidebarNavItemsProps { export function DocsSidebarNavItems({ items }: DocsSidebarNavItemsProps) { return items?.length ? ( -
+
{items.map((item, index) => ( - - {item.title} - + ))}
) diff --git a/apps/web/components/toc.tsx b/apps/web/components/toc.tsx index d91db29..f39a77b 100644 --- a/apps/web/components/toc.tsx +++ b/apps/web/components/toc.tsx @@ -11,17 +11,14 @@ interface TocProps { } export function DashboardTableOfContents({ toc }: TocProps) { - const itemIds = React.useMemo( - () => - toc.items - ? toc.items - .flatMap(item => [item.url, item?.items?.map(item => item.url)]) - .flat() - .filter(Boolean) - .map(id => id?.split('#')[1]) - : [], - [toc], - ) + const itemIds = React.useMemo(() => toc.items + ? toc.items + .flatMap(item => [item.url, item?.items?.map(item => item.url)]) + .flat() + .filter(Boolean) + .map(id => id?.split('#')[1]) + : [], [toc]) + const activeHeading = useActiveItem(itemIds) const mounted = useMounted() diff --git a/apps/web/constants/faqs.ts b/apps/web/constants/faqs.ts new file mode 100644 index 0000000..b015e78 --- /dev/null +++ b/apps/web/constants/faqs.ts @@ -0,0 +1,44 @@ +// generate array of FAQ + +export const FAQs = [ + { + question: 'What is the purpose of this app?', + answer: 'The purpose of this app is to provide a platform for users to search for and view information about various movies and TV shows.', + }, + { + question: 'How do I search for a movie or TV show?', + answer: 'You can search for a movie or TV show by typing the name of the movie or TV show in the search bar at the top of the page.', + }, + { + question: 'How do I view information about a movie or TV show?', + answer: 'You can view information about a movie or TV show by clicking on the movie or TV show in the search results.', + }, + { + question: 'How do I save a movie or TV show to my watchlist?', + answer: 'You can save a movie or TV show to your watchlist by clicking the "Add to Watchlist" button on the movie or TV show page.', + }, + { + question: 'How do I view my watchlist?', + answer: 'You can view your watchlist by clicking the "Watchlist" link in the navigation bar at the top of the page.', + }, + { + question: 'How do I remove a movie or TV show from my watchlist?', + answer: 'You can remove a movie or TV show from your watchlist by clicking the "Remove from Watchlist" button on the movie or TV show page.', + }, + { + question: 'How do I view information about a movie or TV show in my watchlist?', + answer: 'You can view information about a movie or TV show in your watchlist by clicking on the movie or TV show in the watchlist.', + }, + { + question: 'How do I clear my watchlist?', + answer: 'You can clear your watchlist by clicking the "Clear Watchlist" button on the watchlist page.', + }, + { + question: 'How do I view information about a movie or TV show in my watchlist?', + answer: 'You can view information about a movie or TV show in your watchlist by clicking on the movie or TV show in the watchlist.', + }, + { + question: 'How do I clear my watchlist?', + answer: 'You can clear your watchlist by clicking the "Clear Watchlist" button on the watchlist page.', + }, +]