diff --git a/apps/docs/content/help/faq.mdx b/apps/docs/content/help/faq.mdx index ef42f871..ce8c1a4f 100644 --- a/apps/docs/content/help/faq.mdx +++ b/apps/docs/content/help/faq.mdx @@ -2,24 +2,24 @@ title: Frequently Asked Questions --- import Accordion from "/src/components/Accordion" +import { FAQ, FAQItem } from "/src/components/Faq" -## General -{/* - Docusaurus is an open-source static site generator that helps you build optimized websites quickly, focusing on documentation sites. - */} +### General -
- 1. What is the Zerops GUI URL? -

- Head straight to https://app.zerops.io -

-
+ + + Where can I find the Zerops Dashboard GUI? + You can access the Zerops Dashboard GUI directly at app.zerops.io + + + How much does it cost to get started? + It's free to get started, and no credit card is required! However, we recommend visiting our pricing page to explore the options that best suit your needs. + + + I have more questions. Where can I reach out to get help? + You can reach us on our Discord server for support. For additional contact options, please visit our contacts page. + + -
- 2. What is the current Zerops pricing? -

- See our pricing. -

-
diff --git a/apps/docs/src/components/Faq/index.tsx b/apps/docs/src/components/Faq/index.tsx new file mode 100644 index 00000000..84778c8a --- /dev/null +++ b/apps/docs/src/components/Faq/index.tsx @@ -0,0 +1,53 @@ +import { ChevronDownMini, ChevronUpMini } from "@medusajs/icons"; +import React, { ReactNode, useState, useRef, useEffect } from "react"; + +interface FAQ { + question: string; + answer: string | ReactNode; +} + +export function FAQItem({ children }: Readonly<{ children: ReactNode[] }>) { + const [isOpen, setIsOpen] = useState(false); + const [question, answer] = React.Children.toArray(children); + const answerRef = useRef(null); + const [height, setHeight] = useState(0); + + useEffect(() => { + if (isOpen && answerRef.current) { + setHeight(answerRef.current.scrollHeight); + } else { + setHeight(0); + } + }, [isOpen]); + + return ( +
+
+ +
+
{answer}
+
+
+
+ ); +} + +export function FAQ({ children }: Readonly<{ children: ReactNode }>) { + return
{children}
; +}