UNPKG

@capgeminiuk/dcx-react-library

Version:

[![CircleCI](https://circleci.com/gh/Capgemini/dcx-react-library.svg?style=svg)](https://circleci.com/gh/Capgemini/dcx-react-library)

58 lines (57 loc) 1.58 kB
import React from 'react'; type RangeProps = { /** * max value of the range component */ max?: number; /** * min value of the range component */ min?: number; /** * current value of the range component */ value?: number; /** * generic parameter to pass whatever element before the input **/ prefix?: JSX.Element; /** * generic parameter to pass whatever element after the input **/ suffix?: JSX.Element; /** * allow to enable disable the range slider */ disabled?: boolean; /** * define the aria-label for accessibility. If no value is passed it will render input-slider */ ariaLabel?: string; /** * function that will trigger all the time there's a change in the input **/ onChange?: (value: number) => void; /** * function that will trigger when the max postfix is clicked **/ onChangeMax?: (value: number) => void; /** * function that will trigger when the min postfix is clicked **/ onChangeMin?: (value: number) => void; /** * optional className to style the slider */ inputClass?: string; /** * allow to enable displaying a tooltip on the range slider */ showTooltip?: boolean; /** * tab index value */ tabIndex?: number; }; export declare const Range: ({ min, max, value, prefix, suffix, disabled, ariaLabel, onChange, onChangeMax, onChangeMin, inputClass, showTooltip, tabIndex, ...props }: RangeProps) => React.JSX.Element; export {};