Skip to main content
Glama
deleonio
by deleonio
resize-textarea.ts835 B
import type { Generic } from 'adopted-style-sheets'; import { watchValidator } from '../utils'; export const textareaResizeOptions = ['vertical', 'none'] as const; export type TextareaResizePropType = (typeof textareaResizeOptions)[number]; /** * Defines how the textarea can be resized by the user. */ export type PropResizeTextarea = { resize: TextareaResizePropType; }; const isTextareaResizePropType = (value: unknown): value is TextareaResizePropType => { return typeof value === 'string' && textareaResizeOptions.includes(value as TextareaResizePropType); }; export const validateResizeTextarea = (component: Generic.Element.Component, value?: TextareaResizePropType): void => { watchValidator(component, '_resize', isTextareaResizePropType, new Set(textareaResizeOptions), value, { defaultValue: 'vertical', }); };

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