alinea
Version:
Headless git-based CMS
20 lines (19 loc) • 803 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 text field */
export interface DateOptions 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;
}
/** Internal representation of a date field */
export declare class DateField extends ScalarField<string, DateOptions> {
}
/** Create a date field configuration */
export declare function date(label: string, options?: WithoutLabel<DateOptions>): DateField;