some dropdown works

This commit is contained in:
2024-08-27 21:34:52 -06:00
parent fc245b111b
commit 9e20ac6b3d

View File

@@ -3,9 +3,35 @@ import React from "react";
export default function ExpandableModule({ module }: { module: LocalModule }) { export default function ExpandableModule({ module }: { module: LocalModule }) {
return ( return (
<details> <>
<summary> {module.name}</summary> <section className="">
expanded details <label>
</details> <div
className="
max-h-14 max-w-xs
overflow-hidden
rounded-lg
bg-slate-800
px-4 py-0 mb-3
transition-all duration-500
peer-checked/showLabel:max-h-screen
"
>
<div className="flex h-14 cursor-pointer items-center font-bold">
<input
className="peer/showLabel absolute scale-0"
type="checkbox"
/>
{module.name}
</div>
<hr />
<p className="mb-2">
crafted a sleek collapsible panel using Tailwind CSS without the
need for JavaScript. Impressive! 😎
</p>
</div>
</label>
</section>
</>
); );
} }