UNPKG

1.23 kBTypeScriptView Raw
1import * as React from 'react';
2import type { AriaValueFormat, Direction, SliderClassNames, SliderStyles } from './interface';
3export interface SliderContextProps {
4 min: number;
5 max: number;
6 includedStart: number;
7 includedEnd: number;
8 direction: Direction;
9 disabled?: boolean;
10 keyboard?: boolean;
11 included?: boolean;
12 step: number | null;
13 range?: boolean;
14 tabIndex: number | number[];
15 ariaLabelForHandle?: string | string[];
16 ariaLabelledByForHandle?: string | string[];
17 ariaValueTextFormatterForHandle?: AriaValueFormat | AriaValueFormat[];
18 classNames: SliderClassNames;
19 styles: SliderStyles;
20}
21declare const SliderContext: React.Context<SliderContextProps>;
22export default SliderContext;
23export interface UnstableContextProps {
24 onDragStart?: (info: {
25 rawValues: number[];
26 draggingIndex: number;
27 draggingValue: number;
28 }) => void;
29 onDragChange?: (info: {
30 rawValues: number[];
31 deleteIndex: number;
32 draggingIndex: number;
33 draggingValue: number;
34 }) => void;
35}
36/** @private NOT PROMISE AVAILABLE. DO NOT USE IN PRODUCTION. */
37export declare const UnstableContext: React.Context<UnstableContextProps>;