@types/rheostat
TypeScript icon, indicating that this package has built-in type declarations

3.0.6 • Public • Published

Installation

npm install --save @types/rheostat

Summary

This package contains type definitions for rheostat (https://github.com/airbnb/rheostat).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rheostat.

index.d.ts

import * as React from "react";

export type Orientation = "horizontal" | "vertical";

export interface Algorithm {
    getPosition(value: number, min: number, max: number): number;
    getValue(pos: number, min: number, max: number): number;
}

export interface PublicState {
    max: number;
    min: number;
    values: number[];
}

export interface Events {
    getNextHandlePosition?(handleIdx: number, percentPosition: number): number;
    onClick?(): any;
    onChange?(publicState: PublicState): any;
    onKeyPress?(): any;
    onSliderDragEnd?(): any;
    onSliderDragMove?(): any;
    onSliderDragStart?(): any;
    onValuesUpdated?(publicState: PublicState): any;
}

export interface Props extends Events {
    algorithm?: Algorithm | undefined;
    autoAdjustVerticalPosition?: boolean | undefined;
    background?: React.ElementType | undefined;
    className?: string | undefined;
    disabled?: boolean | undefined;
    handle?: React.ElementType | undefined;
    max?: number | undefined;
    min?: number | undefined;
    orientation?: Orientation | undefined;
    pitComponent?: React.ElementType | undefined;
    pitPoints?: number[] | undefined;
    progressBar?: React.ElementType | undefined;
    snap?: boolean | undefined;
    snapPoints?: number[] | undefined;
    values?: number[] | undefined;
}

export default class Rheostat extends React.Component<Props, never> {}

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Wil Lee, and Stefan Wer.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/rheostat

Weekly Downloads

3,570

Version

3.0.6

License

MIT

Unpacked Size

5.58 kB

Total Files

5

Last publish

Collaborators

  • types