inkeep-search.tsx 597 B

12345678910111213141516171819202122232425
  1. "use client";
  2. import type { SharedProps } from "fumadocs-ui/components/dialog/search";
  3. import {
  4. InkeepModalSearchAndChat,
  5. type InkeepModalSearchAndChatProps,
  6. } from "@inkeep/cxkit-react";
  7. import { useInkeepConfig } from "./useInkeepConfig";
  8. export default function CustomDialog(props: SharedProps) {
  9. const baseConfig = useInkeepConfig();
  10. const { open, onOpenChange } = props;
  11. const config = {
  12. ...baseConfig,
  13. modalSettings: {
  14. isOpen: open,
  15. onOpenChange,
  16. },
  17. };
  18. return (
  19. <InkeepModalSearchAndChat {...(config as InkeepModalSearchAndChatProps)} />
  20. );
  21. }