Skip to main content
Glama
deleonio
by deleonio
button-variant.ts858 B
/* types */ import type { Generic } from 'adopted-style-sheets'; import { watchValidator } from '../utils'; const buttonVariantPropTypeOptions = ['primary', 'secondary', 'normal', 'tertiary', 'danger', 'ghost', 'custom'] as const; export type ButtonVariantPropType = (typeof buttonVariantPropTypeOptions)[number]; /** * Defines which variant should be used for presentation. */ export type PropButtonVariant = { variant: ButtonVariantPropType; }; /* validator */ export const validateButtonVariant = (component: Generic.Element.Component, value?: ButtonVariantPropType): void => { watchValidator( component, `_buttonVariant`, (value) => typeof value === 'string' && buttonVariantPropTypeOptions.includes(value), new Set([`KoliBriButtonVariant {${buttonVariantPropTypeOptions.join(', ')}`]), value, { defaultValue: 'normal', }, ); };

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