Skip to main content
Glama
deleonio
by deleonio
link-on-callbacks.ts689 B
import type { Generic } from 'adopted-style-sheets'; import type { Callback } from '../enums'; import type { EventValueOrEventCallback } from '../types/callbacks'; /* types */ export type LinkOnCallbacksPropType = { [Callback.onClick]?: EventValueOrEventCallback<Event, string>; }; /** * Defines the callback functions for links. */ export type PropLinkOnCallbacks = { on: LinkOnCallbacksPropType; }; /* validator */ export const validateLinkCallbacks = (component: Generic.Element.Component, value?: LinkOnCallbacksPropType): void => { if (typeof value === 'object' && typeof value?.onClick === 'function') { component.state = { ...component.state, _on: value, }; } };

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