@cn-ui/core
Version:
The @cn-ui/core is a collection of UI components and utilities for building modern web applications with SolidJS.
23 lines (22 loc) • 769 B
TypeScript
import { type Atom } from "@cn-ui/reactive";
import type { CountConfig } from "./BaseInput";
export interface CountProps {
count?: boolean | CountConfig;
model: Atom<string>;
allowExceed?: boolean;
}
/** input 右侧的计数文本组件 */
export declare const useTextCount: (props: CountProps) => {
TextCount: import("solid-js").JSX.Element;
countOptional: import("@cn-ui/reactive").ComputedAtom<{
max?: number;
strategy: (value: string) => number;
show?: boolean | ((args: {
value: string;
count: number;
maxLength?: number;
}) => import("solid-js").JSXElement);
exceedFormatter: (value: string, config: CountConfig) => string;
}>;
textLengthControl(): void;
};