Skip to main content
Glama
deleonio
by deleonio
aria-current-value.ts1.02 kB
/* types */ import type { Generic } from 'adopted-style-sheets'; import { watchValidator } from '../utils'; /** * Defines the value for the aria-current attribute. * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current * @see https://www.aditus.io/aria/aria-current/ */ const ariaCurrentValuePropTypeOptions = ['date', 'location', 'page', 'step', 'time', 'true', 'false'] as const; export type AriaCurrentValuePropType = (typeof ariaCurrentValuePropTypeOptions)[number]; export type PropAriaCurrentValue = { ariaCurrentValue: AriaCurrentValuePropType; }; /* validator */ export const validateAriaCurrentValue = (component: Generic.Element.Component, value?: AriaCurrentValuePropType): void => { watchValidator( component, `_ariaCurrentValue`, (value) => typeof value === 'string' && ariaCurrentValuePropTypeOptions.includes(value), new Set([`AriaCurrentValue {${ariaCurrentValuePropTypeOptions.join(', ')}`]), value, { defaultValue: 'page', }, ); };

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