Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

refactor(docs): share DecimalAPI type between components

Sushmithamalleshdcbd9c85cb87
diff --git a/docs/components/ask-ai-button.tsx b/docs/components/ask-ai-button.tsx
index 5d47952b7..d80f1a2df 100644
--- a/docs/components/ask-ai-button.tsx
+++ b/docs/components/ask-ai-button.tsx
@@ -5,11 +5,7 @@ import { Search, MessageSquare } from 'lucide-react';
import { useSearchContext } from '@fumadocs/ui/contexts/search';
import { useI18n } from '@fumadocs/ui/contexts/i18n';
-type DecimalAPI = {
- show: () => void;
- hide: () => void;
- theme: (config: Record<string, string>) => void;
-};
+import type { DecimalAPI } from './decimal-widget';
function getDecimal() {
return (window as typeof window & { Decimal?: DecimalAPI }).Decimal;
diff --git a/docs/components/decimal-widget.tsx b/docs/components/decimal-widget.tsx
index 765308b44..34bfa4f0c 100644
--- a/docs/components/decimal-widget.tsx
+++ b/docs/components/decimal-widget.tsx
@@ -3,7 +3,7 @@
import Script from 'next/script';
import { useEffect, useState } from 'react';
-type DecimalAPI = {
+export type DecimalAPI = {
show: () => void;
hide: () => void;
theme: (config: Record<string, string>) => void;