Skip to main content
Glama
deleonio
by deleonio
variant-input-checkbox.ts904 B
import type { Generic } from 'adopted-style-sheets'; import { watchValidator } from '../utils'; export const inputCheckboxVariantOptions = ['button', 'default', 'switch'] as const; export type InputCheckboxVariantPropType = (typeof inputCheckboxVariantOptions)[number]; /** * Defines the variant for presenting the input-checkbox component. */ export type PropVariantInputCheckbox = { variant: InputCheckboxVariantPropType; }; const isInputCheckboxVariantPropType = (value: unknown): value is InputCheckboxVariantPropType => { return typeof value === 'string' && inputCheckboxVariantOptions.includes(value as InputCheckboxVariantPropType); }; export const validateVariantInputCheckbox = (component: Generic.Element.Component, value?: InputCheckboxVariantPropType): void => { watchValidator(component, '_variant', isInputCheckboxVariantPropType, new Set(inputCheckboxVariantOptions), 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