UNPKG

alinea

Version:
21 lines (20 loc) 790 B
import type { FieldOptions, WithoutLabel } from 'alinea/core'; import { ScalarField } from 'alinea/core/field/ScalarField'; import type { ReactNode } from 'react'; 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?: ReactNode; /** 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;