FAQ
id != 1) : activities.push(1)">
How to use the app?
To use the app, simply download it from the app store, create an account, and start exploring the features.
id != 2) : activities.push(2)">
How to reset my password?
To reset your password, go to the login screen, click on 'Forgot Password?', and follow the instructions sent to your email.
id != 3) : activities.push(3)">
How to contact support?
You can contact support by going to the settings menu and selecting 'Contact Support'.
id != 4) : activities.push(4)">
How to update my profile?
To update your profile, go to the settings menu and select 'Edit Profile'.
id != 5) : activities.push(5)">
How to delete my account?
To delete your account, go to the settings menu, select 'Account', and then 'Delete Account'.
FAQ
Входные параметры
interface Props {
items: TFaqItem[];
title?: string;
class?: string;
}
type TFaqItem = {
id: string | number;
question: string;
answer: string;
open: boolean;
}
Использование
---
import Faq from '@/blocks/faq/Faq.astro';
import faqItems from '@/data/site/faq.json';
---
<Faq items={faqItems} title="FAQ" class="bg-gray-50" />
Пример faq.json
[
{
"id": 1,
"question": "How to use the app?",
"answer": "To use the app, simply download it from the app store, create an account, and start exploring the features.",
"open": true
}
]
| Имя параметра | По умолчанию | Описание |
|---|---|---|
| items | - | Массив элементов TFaqItem |
| title | - | Заголовок секции |
| class | - | CSS классы для секции |
TFaqItem
| Имя параметра | По умолчанию | Описание |
|---|---|---|
| id | - | string or number |
| question | - | string - вопрос |
| answer | - | string - ответ |
| open | - | открыть аккордион? true or false |