We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/devsung94/next-mcp-test'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
use-max-height.ts•589 B
/**
* Source: https://github.com/openai/openai-apps-sdk-examples/tree/main/src
*/
import { useOpenAIGlobal } from "./use-openai-global";
/**
* Hook to get the maximum height available for the widget.
* Useful for responsive layouts that need to adapt to container constraints.
*
* @returns The maximum height in pixels, or null if not available
*
* @example
* ```tsx
* const maxHeight = useMaxHeight();
* const style = { maxHeight: maxHeight ?? "100vh", overflow: "auto" };
* ```
*/
export function useMaxHeight(): number | null {
return useOpenAIGlobal("maxHeight");
}