react-native-a11y-slider
Version:
An accessible range slider that supports assistive devices like screen readers
32 lines (31 loc) • 1.54 kB
TypeScript
import React from "react";
import { AccessibilityProps, StyleProp, ViewStyle, TextStyle, Insets } from "react-native";
import { SliderStop, PanBoundaries, MarkerType, setA11yMarkerPropsFunction, SliderType } from "./types";
import Label from "./Label";
import Marker from "./Marker";
/**
* The container that holds the marker and label and handles the panning gesture.
*/
type GestureContainerProps = AccessibilityProps & {
type: MarkerType;
sliderType: SliderType;
markerCount: number;
position: SliderStop;
stops: SliderStop[];
minValue?: number;
maxValue?: number;
panBoundaries: PanBoundaries;
showLabel?: boolean;
markerColor?: string;
hitSlop?: Insets;
labelStyle?: StyleProp<ViewStyle>;
labelTextStyle?: StyleProp<TextStyle>;
labelComponent?: typeof Label;
markerComponent?: typeof Marker;
onSlidingStart?: (slider: MarkerType) => void;
onSlidingComplete?: (slider: MarkerType) => void;
setIndex: (position: number, pushOther?: boolean) => void;
setA11yMarkerProps?: setA11yMarkerPropsFunction;
};
declare const _default: React.MemoExoticComponent<({ type, sliderType, markerCount, minValue, maxValue, position, stops, showLabel, markerColor, hitSlop, panBoundaries: panBoundariesProp, setIndex: setIndexProp, labelStyle, labelTextStyle, labelComponent: LabelComponent, markerComponent: MarkerComponent, onSlidingStart, onSlidingComplete, setA11yMarkerProps, ...accessibilityProps }: GestureContainerProps) => React.JSX.Element>;
export default _default;