@majapisoftwares/ui 4.3.11 → 4.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
className?: string;
|
|
5
|
-
type?: "single" | "multiple";
|
|
6
|
-
}): import("react").JSX.Element;
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
import * as RAccordion from "@radix-ui/react-accordion";
|
|
3
|
+
declare function Accordion({ children, className, ...props }: ComponentProps<typeof RAccordion.Root>): import("react").JSX.Element;
|
|
7
4
|
declare namespace Accordion {
|
|
8
5
|
var Item: typeof AccordionItem;
|
|
9
6
|
}
|
|
@@ -2,8 +2,8 @@ import { ChevronUpIcon } from "@heroicons/react/20/solid";
|
|
|
2
2
|
import { useId } from "react";
|
|
3
3
|
import * as RAccordion from "@radix-ui/react-accordion";
|
|
4
4
|
import clsx from "../../utils/clsx";
|
|
5
|
-
export default function Accordion({ children, className,
|
|
6
|
-
return (<RAccordion.Root
|
|
5
|
+
export default function Accordion({ children, className, ...props }) {
|
|
6
|
+
return (<RAccordion.Root {...props} className={clsx("flex flex-col gap-2", className)} {...(props.type === "single" ? { collapsible: true } : {})}>
|
|
7
7
|
{children}
|
|
8
8
|
</RAccordion.Root>);
|
|
9
9
|
}
|
package/package.json
CHANGED