Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit a89e108

Browse files
feat: faqs animation (#577)
1 parent 6d472fd commit a89e108

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/trello.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ on:
1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
13-
steps:
14-
# Link PR to Trello
13+
steps:
14+
# Link PR to Trello
1515
- name: Link to Trello
1616
uses: rematocorp/[email protected]
1717
with:

layout/FAQs/components/Question/index.tsx

+8-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ export default function Question({
2121
<h2 className="font-terminal-uppercase mb-4 text-2xl md:text-4xl">
2222
{title}
2323
</h2>
24-
{showQuestion && <p>{description}</p>}
24+
<div
25+
className={`transition-max-height overflow-hidden duration-300 ${
26+
showQuestion ? "max-h-48 opacity-100" : "max-h-0 opacity-0"
27+
}`}
28+
>
29+
{description && <p>{description}</p>}
30+
</div>
2531
<div className="flex items-center justify-end">
2632
<Link
2733
href={href}
@@ -30,7 +36,7 @@ export default function Question({
3036
{link}
3137
</Link>
3238
<button
33-
className="font-terminal-uppercase w-16 rounded-full bg-quinary px-2 text-xl text-white"
39+
className="font-terminal-uppercase w-16 transform rounded-full bg-quinary px-2 text-xl text-white transition-transform duration-300 hover:scale-110"
3440
onClick={() =>
3541
setShowQuestion((prevShowQuestion) => !prevShowQuestion)
3642
}

0 commit comments

Comments
 (0)