From 9ccb32b7437ff43ae0651881fcbe2e916c636720 Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Tue, 6 Feb 2024 13:48:41 +0100 Subject: [PATCH] fix: filled the empty space below collapsed content (#773) * fix: filled the empty space below collapsed content * fix: fixed timings --- src/components/account/AccountDetails/index.tsx | 15 ++++++++++++--- src/components/common/Accordion.tsx | 2 +- src/components/common/AccordionContent.tsx | 8 -------- src/types/interfaces/components/Accordion.d.ts | 7 +++++++ 4 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 src/types/interfaces/components/Accordion.d.ts diff --git a/src/components/account/AccountDetails/index.tsx b/src/components/account/AccountDetails/index.tsx index c6b57578..fbf96df1 100644 --- a/src/components/account/AccountDetails/index.tsx +++ b/src/components/account/AccountDetails/index.tsx @@ -136,7 +136,7 @@ function AccountDetails(props: Props) { className={classNames( 'group/accountdetail relative min-h-75', 'border rounded-base border-white/20', - 'backdrop-blur-sticky z-2', + 'backdrop-blur-sticky z-3 overflow-hidden', !reduceMotion && 'transition-all duration-500', accountDetailsExpanded ? 'is-expanded w-full h-auto' @@ -198,16 +198,25 @@ function AccountDetails(props: Props) {
+
React.ReactNode - isOpen?: boolean - renderSubTitle: () => React.ReactNode - toggleOpen: (index: number) => void -} - export default function AccordionContent(props: Props) { const { title, renderContent, isOpen, renderSubTitle, toggleOpen } = props.item diff --git a/src/types/interfaces/components/Accordion.d.ts b/src/types/interfaces/components/Accordion.d.ts new file mode 100644 index 00000000..21155c36 --- /dev/null +++ b/src/types/interfaces/components/Accordion.d.ts @@ -0,0 +1,7 @@ +interface Item { + title: string + renderContent: () => React.ReactNode + isOpen?: boolean + renderSubTitle: () => React.ReactNode + toggleOpen: (index: number) => void +}