UNPKG

@atlaskit/range

Version:

A range lets users choose an approximate value on a slider.

51 lines (50 loc) 1.52 kB
import React from 'react'; export type OwnProps = { /** * Sets the default value if range is not set. */ defaultValue?: number; /** * Sets whether the field range is disabled. */ isDisabled?: boolean; /** * Sets the maximum value of the range. */ max?: number; /** * Sets the minimum value of the range. */ min?: number; /** * Hook to be invoked on change of the range. */ onChange?: (value: number) => void; /** * Sets the step value for the range. */ step?: number; /** * A `testId` prop is provided for specific elements. This is a unique string * that appears as a data attribute `data-testid` in the rendered code and * serves as a hook for automated tests. */ testId?: string; /** * Sets the value of the range. */ value?: number; }; type Combine<First, Second> = Omit<First, keyof Second> & Second; export type RangeProps = Combine<Omit<React.InputHTMLAttributes<HTMLInputElement>, 'disabled' | 'required' | 'checked'>, OwnProps>; /** * __Range__ * * A range lets users choose an approximate value on a slider. * * - [Examples](https://atlassian.design/components/range/examples) * - [Code](https://atlassian.design/components/range/code) * - [Usage](https://atlassian.design/components/range/usage) */ declare const Range: React.ForwardRefExoticComponent<React.PropsWithoutRef<RangeProps> & React.RefAttributes<HTMLInputElement>>; export default Range;