Skip to content

Commit

Permalink
FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
lazoliver committed May 20, 2023
1 parent c6f3b04 commit c53cab6
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 46 deletions.
4 changes: 1 addition & 3 deletions components/footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Icon, {
AvailableIcons,
} from "$store/components/ui/Icon.tsx";
import Icon, { AvailableIcons } from "$store/components/ui/Icon.tsx";
import Newsletter from "$store/islands/Newsletter.tsx";
import type { ComponentChildren } from "preact";

Expand Down
12 changes: 3 additions & 9 deletions components/header/Modals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,9 @@ import type { Props as MenuProps } from "$store/components/header/Menu.tsx";
import type { Props as SearchbarProps } from "$store/components/search/Searchbar.tsx";
import Loading from "$store/components/ui/Loading.tsx";

const Menu = lazy(() =>
import("$store/components/header/Menu.tsx")
);
const Cart = lazy(() =>
import("$store/components/minicart/Cart.tsx")
);
const Searchbar = lazy(() =>
import("$store/components/search/Searchbar.tsx")
);
const Menu = lazy(() => import("$store/components/header/Menu.tsx"));
const Cart = lazy(() => import("$store/components/minicart/Cart.tsx"));
const Searchbar = lazy(() => import("$store/components/search/Searchbar.tsx"));

interface Props {
menu: MenuProps;
Expand Down
4 changes: 1 addition & 3 deletions components/ui/Features.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Icon, {
AvailableIcons,
} from "$store/components/ui/Icon.tsx";
import Icon, { AvailableIcons } from "$store/components/ui/Icon.tsx";

export interface Feature {
/**
Expand Down
2 changes: 1 addition & 1 deletion schemas.gen.json
Original file line number Diff line number Diff line change
Expand Up @@ -12572,4 +12572,4 @@
}
}
}
}
}
70 changes: 40 additions & 30 deletions sections/Faq.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
export interface Props {
contact: string;
questions: Array<{
question: string;
answer: string
}>;
contact: string;
questions: Array<{
question: string;
answer: string;
}>;
}

export default function FAQ({ questions, contact }: Props) {
return (
export default function FAQ({ questions, contact }: Props) {
return (
<div class="base-500">
<div class="container sm:w-1/2 px-4 my-16">
<h2 class="text-5xl text-center mb-6">FAQs</h2>
<p class="text-lg text-center mb-20 p-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.</p>
<ul>
{questions.map(({
question, answer
}) =>
<div tabIndex={0} class="collapse collapse-arrow">
<div>
<li class="collapse-title border-t text-xl font-medium px-0">{question}</li>
</div>
<div class="collapse-content px-0 collapse-close">
<li>{answer}</li>
</div>
</div>
)}
</ul>
<h3 class="text-4xl text-center mt-20 mb-3 p-text">Still have a question?</h3>
<p class="text-lg text-center mb-6 p-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<a href={contact} class="my-btn">Contact</a>
</div>
<div class="container sm:w-1/2 px-4 my-16">
<h2 class="text-5xl text-center mb-6">FAQs</h2>
<p class="text-lg text-center mb-20 p-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
varius enim in eros elementum tristique.
</p>
<ul>
{questions.map(({
question,
answer,
}) => (
<div tabIndex={0} class="collapse collapse-arrow">
<div>
<li class="collapse-title border-t text-xl font-medium px-0">
{question}
</li>
</div>
<div class="collapse-content px-0 collapse-close">
<li>{answer}</li>
</div>
</div>
))}
</ul>
<h3 class="text-4xl text-center mt-20 mb-3 p-text">
Still have a question?
</h3>
<p class="text-lg text-center mb-6 p-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</p>
<a href={contact} class="my-btn">Contact</a>
</div>
</div>
)
}
);
}

0 comments on commit c53cab6

Please sign in to comment.