feat: Implement Algolia DocSearch, enhance MDX components, and update build configurations.

This commit is contained in:
gitfromwildan
2026-02-08 23:10:20 +07:00
parent 8b3de652bb
commit 099c384d9d
43 changed files with 1617 additions and 1156 deletions

View File

@@ -0,0 +1,31 @@
"use client"
import React, { ReactNode } from "react";
import clsx from "clsx";
import { AccordionGroupContext } from "@/components/contexts/AccordionContext";
interface AccordionGroupProps {
children: ReactNode;
className?: string;
}
const AccordionGroup: React.FC<AccordionGroupProps> = ({ children, className }) => {
return (
// Wrap all children with the AccordionGroupContext.Provider
// so that any nested accordions know they are inside a group.
// This enables group-specific behavior in child components.
<AccordionGroupContext.Provider value={{ inGroup: true }}>
<div
className={clsx(
"border rounded-lg overflow-hidden",
className
)}
>
{children}
</div>
</AccordionGroupContext.Provider>
);
};
export default AccordionGroup;