@cn-ui/core
Version:
The @cn-ui/core is a collection of UI components and utilities for building modern web applications with SolidJS.
16 lines (15 loc) • 817 B
TypeScript
import type { SelectOptionsType } from "@cn-ui/reactive";
/** clamps number within the inclusive lower and upper bounds */
export declare const clamp: (num: number, min: number, max: number) => number;
export declare function getElementTranslateY(element: Element): number;
export declare function findIndexOfEnabledOption(options: PickerColumnProps["options"], index: number): number;
export interface PickerColumnProps {
options: SelectOptionsType[];
readonly?: boolean;
/** 单个选项高度 */
optionHeight?: number;
/** 可视范围内的选项数 */
visibleOptionNum?: number;
swipeDuration?: number;
}
export declare const PickerColumn: import("solid-js").Component<import("@cn-ui/reactive").OriginComponentOutputType<PickerColumnProps, HTMLDivElement, SelectOptionsType | null>>;