mcp-use
Version:
Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents, Clients and Servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.
44 lines • 1.56 kB
TypeScript
/**
* Wrapper component that adds control buttons for widget debugging and view controls.
* Combines debug button and view controls (fullscreen/pip) with shared hover logic.
*/
import React from "react";
type Position = "top-left" | "top-center" | "top-right" | "center-left" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right";
interface WidgetControlsProps {
children: React.ReactNode;
className?: string;
position?: Position;
attachTo?: HTMLElement | null;
showLabels?: boolean;
/**
* Enable debug button to display widget debug information
* @default false
*/
debugger?: boolean;
/**
* Enable fullscreen and pip view controls
* - `true` = show both pip and fullscreen buttons
* - `"pip"` = show only pip button
* - `"fullscreen"` = show only fullscreen button
* @default false
*/
viewControls?: boolean | "pip" | "fullscreen";
}
/**
* Wrapper component that adds control buttons for widget debugging and view controls.
* All buttons share the same hover logic and are rendered together.
*
* @example
* ```tsx
* const MyWidget: React.FC = () => {
* return (
* <WidgetControls debugger viewControls position="top-right">
* <div>My widget content</div>
* </WidgetControls>
* );
* };
* ```
*/
export declare function WidgetControls({ children, className, position, attachTo, showLabels, debugger: enableDebugger, viewControls, }: WidgetControlsProps): React.JSX.Element;
export {};
//# sourceMappingURL=WidgetControls.d.ts.map