UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

22 lines (21 loc) 795 B
import { FieldOptions, WithoutLabel } from 'alinea/core'; import { ScalarField } from 'alinea/core/field/ScalarField'; export interface NumberOptions extends FieldOptions<number | null> { /** Width of the field in the dashboard UI (0-1) */ width?: number; /** Add instructional text to a field */ help?: string; /** Field is optional */ optional?: boolean; /** Display a minimal version */ inline?: boolean; /** A minimum value */ minValue?: number; /** A maximum value */ maxValue?: number; /** Specifies the legal number intervals */ step?: number; } export declare class NumberField extends ScalarField<number | null, NumberOptions> { } export declare function number(label: string, options?: WithoutLabel<NumberOptions>): NumberField;