UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

36 lines (35 loc) 1.18 kB
import { type DigitParts } from './get-digit-parts'; export interface DigitSlot { type: 'digit'; key: string; digit: string; previousDigit: string | null; empty: boolean; } export interface CharSlot { type: 'char'; key: string; char: string; empty: boolean; } export type RenderSlot = DigitSlot | CharSlot; export interface GetRenderSlotsInput { current: DigitParts; previous: DigitParts; prefix?: string; suffix?: string; decimalSeparator?: string; thousandSeparator?: string | boolean; } export declare function getRenderSlots({ current, previous, prefix, suffix, decimalSeparator, thousandSeparator, }: GetRenderSlotsInput): RenderSlot[]; export interface GetRenderSlotsFromValuesInput { value: number; previousValue: number; prefix?: string; suffix?: string; decimalSeparator?: string; thousandSeparator?: string | boolean; decimalScale?: number; fixedDecimalScale?: boolean; } export declare function getRenderSlotsFromValues({ value, previousValue, prefix, suffix, decimalSeparator, thousandSeparator, decimalScale, fixedDecimalScale, }: GetRenderSlotsFromValuesInput): RenderSlot[];