alinea
Version:
Headless git-based CMS
26 lines (25 loc) • 968 B
TypeScript
import type { FieldOptions, WithoutLabel } from 'alinea/core';
import { ScalarField } from 'alinea/core/field/ScalarField';
import type { ReactNode } from 'react';
/** Optional settings to configure a time field */
export interface TimeOptions extends FieldOptions<string> {
/** Width of the field in the dashboard UI (0-1) */
width?: number;
/** Add instructional text to a field */
help?: ReactNode;
/** Display a minimal version */
inline?: boolean;
/** Focus this input automatically */
autoFocus?: boolean;
/** A minimum value */
minValue?: string;
/** A maximum value */
maxValue?: string;
/** Specifies the legal time intervals */
step?: number;
}
/** Internal representation of a date field */
export declare class TimeField extends ScalarField<string, TimeOptions> {
}
/** Create a time field configuration */
export declare function time(label: string, options?: WithoutLabel<TimeOptions>): TimeField;