Skip to main content
Glama
deleonio
by deleonio
min-width.ts842 B
import type { Generic } from 'adopted-style-sheets'; import type { WatchStringOptions } from '../utils'; import { watchValidator } from '../utils'; /* types */ export type MinWidthPropType = string; /** * Defines the technical name of an input field. */ export type PropMinWidth = { minWidth: MinWidthPropType; }; /* constants */ /** * Regular expression to validate the width of a header cell. */ const HEADER_CELL_WIDTH_VALIDATOR = /^\d+(\.\d+)?([a-z]+|%)?$/; /* validator */ export const validateMinWidth = (component: Generic.Element.Component, value?: MinWidthPropType, options?: WatchStringOptions): void => { watchValidator<MinWidthPropType>( component, '_minWidth', (v) => typeof v === 'string' && HEADER_CELL_WIDTH_VALIDATOR.test(v), new Set(['String', '/^\\d+(\\.\\d+)?([a-z]+|%)?$/']), value, options, ); };

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