PromoCursed/node_modules/rc-slider/lib/context.d.ts
2024-08-20 23:25:37 +04:00

38 lines
1.2 KiB
TypeScript

import * as React from 'react';
import type { AriaValueFormat, Direction, SliderClassNames, SliderStyles } from './interface';
export interface SliderContextProps {
min: number;
max: number;
includedStart: number;
includedEnd: number;
direction: Direction;
disabled?: boolean;
keyboard?: boolean;
included?: boolean;
step: number | null;
range?: boolean;
tabIndex: number | number[];
ariaLabelForHandle?: string | string[];
ariaLabelledByForHandle?: string | string[];
ariaValueTextFormatterForHandle?: AriaValueFormat | AriaValueFormat[];
classNames: SliderClassNames;
styles: SliderStyles;
}
declare const SliderContext: React.Context<SliderContextProps>;
export default SliderContext;
export interface UnstableContextProps {
onDragStart?: (info: {
rawValues: number[];
draggingIndex: number;
draggingValue: number;
}) => void;
onDragChange?: (info: {
rawValues: number[];
deleteIndex: number;
draggingIndex: number;
draggingValue: number;
}) => void;
}
/** @private NOT PROMISE AVAILABLE. DO NOT USE IN PRODUCTION. */
export declare const UnstableContext: React.Context<UnstableContextProps>;