@ultraviolet/plus
Version:
Ultraviolet Plus
34 lines (33 loc) • 1.48 kB
TypeScript
import { SelectInput, TextInput } from '@ultraviolet/ui';
import type { ComponentProps, FocusEvent } from 'react';
type SelectOption = Exclude<NonNullable<ComponentProps<typeof SelectInput>['value']>, string>;
export declare const sizesHeight: Record<string, number>;
type UnitInputValue = {
inputValue: number;
unit: SelectOption['value'];
};
type UnitInputProps = {
className?: string;
name: string;
disabled?: boolean;
maxValue?: number;
minValue?: number;
value?: UnitInputValue['inputValue'];
unitValue?: UnitInputValue['unit'];
onChange: (value: UnitInputValue['inputValue']) => void;
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
onChangeUnitValue: (value: UnitInputValue['unit']) => void;
options: SelectOption[];
placeholder?: string;
size?: string;
textBoxWidth?: string | number;
'data-testid'?: string;
notice?: ComponentProps<typeof TextInput>['notice'];
label?: ComponentProps<typeof TextInput>['label'];
required?: boolean;
valueError?: string;
unitError?: string;
type?: ComponentProps<typeof TextInput>['type'];
};
export declare const UnitInput: ({ name, maxValue, minValue, size, placeholder, onChange, onBlur, onChangeUnitValue, value, unitValue, textBoxWidth, disabled, options, className, notice, label, required, valueError, unitError, type, "data-testid": dataTestId, }: UnitInputProps) => import("@emotion/react/jsx-runtime").JSX.Element;
export {};