UNPKG

@itwin/presentation-components

Version:

React components based on iTwin.js Presentation library

36 lines 1.05 kB
import { ChangeEventHandler } from "react"; import { SchemaContext } from "@itwin/ecschema-metadata"; /** * Value of kind of quantity property. * @internal */ export interface QuantityValue { /** Raw value in persistence unit. */ rawValue?: number; /** Formatted value with unit label based on active unit system or user input. */ formattedValue: string; roundingError?: number; } /** * Props for [[useQuantityValueInput]] * @internal */ export interface UseQuantityValueInputProps { initialRawValue?: number; schemaContext: SchemaContext; koqName: string; } /** * Custom hook that manages state for quantity values input. * @internal */ export declare function useQuantityValueInput({ initialRawValue, schemaContext, koqName }: UseQuantityValueInputProps): { quantityValue: QuantityValue; inputProps: { onChange: ChangeEventHandler<HTMLInputElement>; placeholder: string; value: string; disabled: boolean; }; }; //# sourceMappingURL=UseQuantityValueInput.d.ts.map