Skip to content

Commit c1a1aea

Browse files
committed
use ExpandableCard
1 parent 5f66d31 commit c1a1aea

File tree

2 files changed

+5
-26
lines changed

2 files changed

+5
-26
lines changed

public/images/network-maturity/network-maturity-icon.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/components/NetworkMaturity.tsx

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,15 @@
1-
import { useState } from "react"
1+
import ExpandableCard from "./ExpandableCard"
22

33
import DevelopingImage from "@/public/images/network-maturity/developing.svg"
44
import EmergingImage from "@/public/images/network-maturity/emerging.svg"
55
import MaturingImage from "@/public/images/network-maturity/maturing.svg"
6-
import Button from "@/public/images/network-maturity/network-maturity-icon.svg"
76
import RobustImage from "@/public/images/network-maturity/robust.svg"
87

98
const NetworkMaturity = () => {
10-
const [isExpanded, setIsExpanded] = useState(false)
11-
129
return (
13-
<div className="network-maturity-card mx-9 mt-10 rounded-lg border bg-white p-6">
14-
{/* Header with toggle button */}
15-
<div
16-
className="flex cursor-pointer items-center justify-between"
17-
onClick={() => setIsExpanded(!isExpanded)}
18-
>
19-
<h2 className="text-xl font-bold">Network maturity explained</h2>
20-
<button aria-label="Toggle section">
21-
<Button
22-
className={`transform transition-transform ${isExpanded ? "" : "rotate-180"}`}
23-
></Button>
24-
</button>
25-
</div>
26-
27-
{/* Collapsible Content */}
28-
{isExpanded && (
29-
<div className="mt-4 border-t py-6">
10+
<div className="mx-9 mt-10">
11+
<ExpandableCard title="Network maturity explained">
12+
<div>
3013
<div className="space-y-4">
3114
{" "}
3215
<p>
@@ -118,7 +101,7 @@ const NetworkMaturity = () => {
118101
</tbody>
119102
</table>
120103
</div>
121-
)}
104+
</ExpandableCard>
122105
</div>
123106
)
124107
}

0 commit comments

Comments
 (0)