UNPKG

@ntragas/pouncejstest

Version:

A collection of UI components from Panther labs

33 lines (32 loc) 1.25 kB
import React from 'react'; import { NativeAttributes } from '../Box'; export declare type NumberInputProps = NativeAttributes<'input'> & { /** Callback when the number changes */ onInputNumberChange?: (e: number) => void; /** Callback when the number changes */ onChange?: (e: React.FormEvent<HTMLInputElement>) => void; /** * The value of the input number. * */ value: number | null; /** The label that is associated with this input */ label: string; /** Whether the input has an invalid value */ invalid?: boolean; /** Whether the input is required or not */ required?: boolean; /** Whether the input is disabled or not */ disabled?: boolean; /** The max number that the input can accept */ max?: number; /** The min number that the input can accept */ min?: number; /** The step in which the input increases */ step?: number; }; /** * A number input is a typical HTML <input> for numbers */ declare function NumberInput({ label, invalid, required, disabled, id, name, value, max, min, onInputNumberChange, onChange, ...rest }: NumberInputProps): React.ReactElement<NumberInputProps>; declare const _default: typeof NumberInput; export default _default;