UNPKG

@alice-ui/react

Version:
30 lines (27 loc) 1.13 kB
import * as react from 'react'; import { ReactNode } from 'react'; import { NumberInputVariantProps, ButtonVariantProps, SlotsToClasses, NumberInputSlots } from '@alice-ui/theme'; import { NumberFieldProps, ValidationResult } from 'react-aria-components'; import { InputProps } from '../input/input.js'; interface NumberInputProps extends NumberFieldProps, NumberInputVariantProps { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); buttonProps?: ButtonVariantProps; inputProps?: InputProps; placeholder?: string; /** * The decrement content to display inside the button. */ decrementContent?: ReactNode; /** * The increment content to display inside the button. */ incrementContent?: ReactNode; /** * Classes object to style the number input and its children. */ classNames?: SlotsToClasses<NumberInputSlots>; } declare const _NumberInput: react.ForwardRefExoticComponent<NumberInputProps & react.RefAttributes<HTMLDivElement>>; export { _NumberInput as NumberInput, type NumberInputProps };