Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
fix(docs): prevent copy page overlap on mobile
Brendan O'Leary committed
Sep 10, 2026 at 09:37 UTC
60313e9e3d5a5cbeb4c9c20d82b4b188a3492820
1 file changed
+5
-6
docs/components/page-actions.tsx
+5
-6
@@ -6,8 +6,8 @@ import { Check, ChevronDown, Copy, ExternalLink, FileText } from 'lucide-react';
6
interface PageActionsProps {
7
path: string;
8
/**
9
- * 'overlap-title' (default) lifts the button into the row above via a
10
- * negative top margin so it lands to the right of `<DocsTitle>`.
9
+ * 'overlap-title' (default) places the button below the title on mobile,
10
+ * then lifts it to the right of `<DocsTitle>` on medium screens and up.
11
* 'inline' renders the button as a normal inline-block — use when the
12
* caller already controls layout (e.g. the Toolkits landing header).
13
*/
@@ -22,9 +22,8 @@ const FALLBACK_ORIGIN = 'https://docs.composio.dev';
22
* - Open in ChatGPT (deep link with a prefilled prompt)
23
* - Open in Claude (deep link with a prefilled prompt)
24
*
25
- * Sits to the right of the page title via `not-prose -mt-12 mb-2 flex justify-end`
26
- * so it overlaps the row above (next to <DocsTitle>) without ever crashing into
27
- * the title text on narrow viewports.
25
+ * Keeps its own row on narrow viewports so it cannot overlap the title text.
26
+ * On medium screens and up, a negative margin lifts it beside the title.
27
*/
28
export function PageActions({ path, variant = 'overlap-title' }: PageActionsProps) {
29
const [open, setOpen] = useState(false);
@@ -77,7 +76,7 @@ export function PageActions({ path, variant = 'overlap-title' }: PageActionsProp
76
}, [path]);
77
78
return (
80
- <div className={variant === 'overlap-title' ? 'not-prose -mt-12 mb-2 flex justify-end pointer-events-none' : 'not-prose inline-block'}>
79
+ <div className={variant === 'overlap-title' ? 'not-prose md:-mt-12 mb-2 flex justify-end pointer-events-none' : 'not-prose inline-block'}>
80
<div ref={wrapperRef} className="relative pointer-events-auto">
81
<button
82
type="button"