Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@types/react-ranger
Advanced tools
TypeScript definitions for react-ranger
npm install --save @types/react-ranger
This package contains type definitions for react-ranger (https://github.com/tannerlinsley/react-ranger#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-ranger.
import { CSSProperties, Key, MouseEvent, TouchEvent } from "react";
export interface RangerOptions {
values: number[];
min: number;
max: number;
stepSize: number;
steps?: number[] | undefined;
tickSize?: number | undefined;
ticks?: number[] | undefined;
onChange?: ((values: number[]) => void) | undefined;
onDrag?: ((values: number[]) => void) | undefined;
interpolator?: {
getPercentageForValue: (val: number, min: number, max: number) => number;
getValueForClientX: (clientX: number, trackDims: object, min: number, max: number) => number;
} | undefined;
}
export interface TrackProps {
key: Key;
style: CSSProperties;
}
export interface TickProps {
key: Key;
style: CSSProperties;
}
export interface SegmentProps {
key: Key;
style: CSSProperties;
}
export interface HandleProps {
key: Key;
style: CSSProperties;
onMouseDown: (event: MouseEvent) => void;
onTouchStart: (event: TouchEvent) => void;
tabIndex: number;
}
export interface RangerTick {
value: number;
getTickProps: <T>(props?: T) => T & TickProps;
}
export interface RangerSegment {
value: number;
getSegmentProps: <T>(props?: T) => T & SegmentProps;
}
export interface RangerHandle {
value: number;
active: boolean;
getHandleProps: <T>(props?: T) => T & HandleProps;
}
export interface Ranger {
getTrackProps: <T>(props?: T) => T & TrackProps;
ticks: RangerTick[];
segments: RangerSegment[];
handles: RangerHandle[];
activeHandleIndex: number | null;
}
export function useRanger(options: RangerOptions): Ranger;
These definitions were written by Matt Polichette, and Guy Gascoigne-Piggford.
FAQs
TypeScript definitions for react-ranger
The npm package @types/react-ranger receives a total of 4,362 weekly downloads. As such, @types/react-ranger popularity was classified as popular.
We found that @types/react-ranger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.