zent
Version:
一套前端设计语言和基于React的实现
25 lines (24 loc) • 854 B
TypeScript
import { CSSProperties } from 'react';
export declare const getLeft: (value: number, min: number, max: number) => number;
export declare const getValue: (ratio: number, min: number, max: number) => number;
export declare const toFixed: (value: number, fractionDigits: number) => number;
export interface ISliderChildCommonProps {
min: number;
max: number;
disabled: boolean;
decimal: number;
value: number;
position: string;
onChange(value: number | string | null): void;
}
export declare type IComputedProps = {
range: true;
leftProps: ISliderChildCommonProps;
rightProps: ISliderChildCommonProps;
trackStyle: CSSProperties;
} | {
range: false;
props: ISliderChildCommonProps;
trackStyle: CSSProperties;
};
export declare function isLeftValue(nextValue: number, value: [number, number]): boolean;