diff --git a/ui/CHANGELOG.md b/ui/CHANGELOG.md index f89c82ef37..8c9c12db4e 100644 --- a/ui/CHANGELOG.md +++ b/ui/CHANGELOG.md @@ -2,8 +2,6 @@ All notable changes to the **Prowler UI** are documented in this file. -<<<<<<< HEAD -======= ## [v1.7.0] (Prowler v5.7.0) – Not released ### 🚀 Added @@ -16,7 +14,6 @@ All notable changes to the **Prowler UI** are documented in this file. - Fix form validation in launch scan workflow. [(#7693)](https://github.com/prowler-cloud/prowler/pull/7693) - Moved ProviderType to a shared types file and replaced all occurrences across the codebase. [(#7710)](https://github.com/prowler-cloud/prowler/pull/7710) ->>>>>>> 60e004057 (fix: move ProviderType to shared types and update usages (#7710)) --- ## [v1.6.0] (Prowler v5.6.0) diff --git a/ui/components/ui/accordion/Accordion.tsx b/ui/components/ui/accordion/Accordion.tsx new file mode 100644 index 0000000000..aa029a121c --- /dev/null +++ b/ui/components/ui/accordion/Accordion.tsx @@ -0,0 +1,109 @@ +"use client"; + +import { + Accordion as NextUIAccordion, + AccordionItem, + Selection, +} from "@nextui-org/react"; +import { ChevronDown } from "lucide-react"; +import React, { ReactNode, useCallback, useState } from "react"; + +import { cn } from "@/lib/utils"; + +export interface AccordionItemProps { + key: string; + title: ReactNode; + subtitle?: ReactNode; + content: ReactNode; + items?: AccordionItemProps[]; + isDisabled?: boolean; +} + +export interface AccordionProps { + items: AccordionItemProps[]; + variant?: "light" | "shadow" | "bordered" | "splitted"; + className?: string; + defaultExpandedKeys?: string[]; + selectionMode?: "single" | "multiple"; + isCompact?: boolean; + showDivider?: boolean; +} + +const AccordionContent = ({ + content, + items, +}: { + content: ReactNode; + items?: AccordionItemProps[]; +}) => { + return ( +