Skip to main content
Glama
deleonio
by deleonio
details-callbacks.ts779 B
import type { Generic } from 'adopted-style-sheets'; import type { Callback } from '../enums'; import type { EventValueOrEventCallback } from '../types/callbacks'; import { watchValidator } from '../utils'; /* types */ export type DetailsCallbacksPropType<T> = { [Callback.onToggle]?: EventValueOrEventCallback<MouseEvent, T>; }; /** * Defines the callback functions for detail events. */ export type PropDetailsCallbacks<T> = { on: DetailsCallbacksPropType<T>; }; /* validator */ export const validateDetailsCallbacks = (component: Generic.Element.Component, value?: DetailsCallbacksPropType<boolean>): void => { watchValidator(component, `_on`, (value) => typeof value === 'object' && value !== null, new Set(['DetailsCallbacksPropType {Events.onToggle}']), 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