Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 6 additions & 28 deletions src/components/exchange/side-section-disclosure.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import Card from "../card";
import {
Disclosure,
DisclosureButton,
DisclosurePanel,
} from "@headlessui/react";

interface ISideSectionDisclosure {
title: string;
Expand All @@ -15,28 +10,11 @@ export default function SideSectionDisclosure({
children,
}: ISideSectionDisclosure) {
return (
<div>
<Card>
<Disclosure defaultOpen as="div" className="w-full">
<DisclosureButton className="group flex w-full items-center justify-between">
<h2 className="text-sm font-semibold uppercase">{title}</h2>
<span
style={{ fontSize: "30px" }}
className="material-symbols-outlined group-data-open:rotate-180"
>
keyboard_arrow_down
</span>
</DisclosureButton>
<div className="overflow-hidden">
<DisclosurePanel
transition
className="origin-top pt-1 transition duration-200 ease-out data-closed:-translate-y-6 data-closed:opacity-0"
>
{children}
</DisclosurePanel>
</div>
</Disclosure>
</Card>
</div>
<Card>
<div className="group flex w-full items-center justify-between">
<h2 className="text-sm font-semibold uppercase">{title}</h2>
</div>
<div className="overflow-hidden">{children}</div>
</Card>
);
}
Loading