From bebed9294a7974a4bca30dd382a904e310c20811 Mon Sep 17 00:00:00 2001 From: vutuanlinh2k2 <69841784+vutuanlinh2k2@users.noreply.github.com> Date: Mon, 24 Apr 2023 20:38:07 +0700 Subject: [PATCH] Tangle website - FAQ section (#1131) --- .../src/components/sections/FAQSection.tsx | 75 +++++++++++++++++++ .../src/components/sections/index.ts | 1 + apps/tangle-website/src/pages/index.tsx | 3 + apps/tangle-website/src/styles/globals.css | 11 +++ 4 files changed, 90 insertions(+) create mode 100644 apps/tangle-website/src/components/sections/FAQSection.tsx diff --git a/apps/tangle-website/src/components/sections/FAQSection.tsx b/apps/tangle-website/src/components/sections/FAQSection.tsx new file mode 100644 index 0000000000..20574e91a7 --- /dev/null +++ b/apps/tangle-website/src/components/sections/FAQSection.tsx @@ -0,0 +1,75 @@ +import { + Accordion, + AccordionItem, + AccordionButton, + AccordionContent, +} from '@webb-tools/webb-ui-components'; + +import { SectionDescription2, SectionHeader, SectionTitle } from '..'; + +const faqItems = [ + { + question: 'Why host a crowdloan and how does it work?', + answer: + 'Crowdloans are an excellent opportunity for people to support a project they are passionate about and earn tokens in that network.', + }, + { + question: 'What is the Tangle Token (TNT) and what is it used for?', + answer: + 'Amet duo ipsum sanctus sanctus aliquyam lorem ipsum voluptua. Dolor erat aliquyam aliquyam ipsum duo amet amet ea. Vero invidunt.', + }, + { + question: 'How to deploy dApps on Tangle Network?', + answer: + 'Amet duo ipsum sanctus sanctus aliquyam lorem ipsum voluptua. Dolor erat aliquyam aliquyam ipsum duo amet amet ea. Vero invidunt.', + }, + { + question: 'How are collators rewards calculated?', + answer: + 'Amet duo ipsum sanctus sanctus aliquyam lorem ipsum voluptua. Dolor erat aliquyam aliquyam ipsum duo amet amet ea. Vero invidunt.', + }, + { + question: 'Why is Tangle Network launched on Kusama Network?', + answer: + 'Amet duo ipsum sanctus sanctus aliquyam lorem ipsum voluptua. Dolor erat aliquyam aliquyam ipsum duo amet amet ea. Vero invidunt.', + }, +]; + +export const FAQSection = () => { + return ( +
+
+
+ Learn More + + Frequently asked questions + + + Need more information? Explore our documentation site or connect + with others in our community channels to learn more! + +
+ + {faqItems.map((item, index) => ( + + + {item.question} + + + {item.answer} + + + ))} + +
+
+ ); +}; diff --git a/apps/tangle-website/src/components/sections/index.ts b/apps/tangle-website/src/components/sections/index.ts index 169af5d799..b1f358f1cf 100644 --- a/apps/tangle-website/src/components/sections/index.ts +++ b/apps/tangle-website/src/components/sections/index.ts @@ -7,3 +7,4 @@ export * from './ParticipationMechanicsSection'; export * from './SupportedBySection'; export * from './CommunitySection'; export * from './UseCasesSection'; +export * from './FAQSection'; diff --git a/apps/tangle-website/src/pages/index.tsx b/apps/tangle-website/src/pages/index.tsx index 9b1b7736e8..98941415e2 100644 --- a/apps/tangle-website/src/pages/index.tsx +++ b/apps/tangle-website/src/pages/index.tsx @@ -9,6 +9,7 @@ import { LaunchPhasesSection, SupportedBySection, UseCasesSection, + FAQSection, } from '../components'; const description = @@ -46,6 +47,8 @@ export function Index() { + + diff --git a/apps/tangle-website/src/styles/globals.css b/apps/tangle-website/src/styles/globals.css index f255ac4d2d..a3152c7b97 100644 --- a/apps/tangle-website/src/styles/globals.css +++ b/apps/tangle-website/src/styles/globals.css @@ -48,3 +48,14 @@ button[data-radix-collection-item][data-state='active'] .participation-tab-polygon { @apply border-t-mono-200; } + +/* Override styling for Accordion component from webb-ui-components */ +button[data-radix-collection-item] > span { + @apply text-[18px] leading-[28px] + md:text-[20px] md:leading-[32px] + items-start text-mono-200; +} + +button[data-radix-collection-item] > svg { + @apply w-6 h-6 +}