-
Notifications
You must be signed in to change notification settings - Fork 3
FAQ
Sam Liu edited this page Mar 5, 2021
·
4 revisions
src/components/FAQ holds all components associated with an FAQ on the FAQ page. The data used to populate the FAQs is retrieved from the Firebase database.
FAQ
|
--- FAQNavBar
|
|
--- FAQs
|
--- CollapsibleHeader
|
--- CollapsibleQuestion
- Takes a question and answer as props.
- Renders a collapsible card for one FAQ question. The card displays
questionwhen closed and can be opened/collapsed by toggling the icon on the left side. - Uses the
Collapsetransition supported byreact-bootstrap.
type Props = {
readonly question: string;
readonly answer: string;
};
- Takes a header name and array of FAQs as props.
- Renders a collapsible card containing a list of
CollapsibleQuestioncomponents representing the FAQs. The card displaysheaderNameas the title of the FAQ section and can be opened/collapsed to show the FAQs by toggling the icon on the left side. - Uses the
Collapsetransition supported byreact-bootstrap.
type Props = {
readonly headerName: string;
readonly faqs: FAQ[];
};
export type FAQ = {
question: string;
answer: string;
};
- Takes an array of
FAQDataas props. - Renders a list of
CollapsibleHeadercomponents representing different FAQ sections.
type Props = {
readonly data: FAQData[];
};
export type FAQData = {
headerName: string;
faqs: FAQ[];
};
- Renders the navigation bar on the FAQ page with a button that links to the Reviews page.