Skip to main content
Glama
deleonio
by deleonio
reuse.ts944 B
/** * This function is used to handle the slot content by * moving a DOM element to a defined slot element. */ export const handleSlotContent = (hostRef: HTMLElement, slotRef: HTMLElement, slotName: string) => { if (hostRef && slotRef && typeof slotName === 'string') { const content = hostRef.querySelector(`[slot="${slotName}"]`); if (content) { slotRef.appendChild(content); } } }; /** * This function is used to check if a label is an empty string. * @param label The label of the slot * @returns True if the label is an empty string */ export const showExpertSlot = (label: unknown) => label === ''; /** * This function builds the BadgeText. It chooses access key over shortkey or empty string, if both are empty * @param accessKey * @param shortKey * @returns returns badgeText as string */ export const buildBadgeTextString = (accessKey?: string, shortKey?: string) => { return accessKey || shortKey || ''; };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/deleonio/public-ui-kolibri'

If you have feedback or need assistance with the MCP directory API, please join our Discord server