@cn-ui/core
Version:
The @cn-ui/core is a collection of UI components and utilities for building modern web applications with SolidJS.
26 lines (25 loc) • 1.03 kB
TypeScript
import { type Atom, useSelect } from "@cn-ui/reactive";
import type { SelectOptionsType } from "@cn-ui/reactive";
import { type BaseFormItemType } from "../form/BaseFormItemType";
export interface CheckboxGroupExpose extends ReturnType<typeof useSelect<SelectOptionsType>> {
}
export interface CheckboxGroupProps extends BaseFormItemType {
/**
* 生成选项
* @tested
*/
options: SelectOptionsType[];
expose?: (expose: CheckboxGroupExpose) => void;
/**
* 是否支持多选
* @tested
*/
multiple?: boolean;
}
export declare const CheckboxGroup: import("solid-js").Component<import("@cn-ui/reactive").OriginComponentOutputType<CheckboxGroupProps, HTMLElement, string[]>>;
/** 全选不选按钮的 hook */
export declare const useControlCheckbox: (checkBoxCtx: Atom<CheckboxGroupExpose | null>) => {
isAllChecked: import("@cn-ui/reactive").ComputedAtom<boolean>;
indeterminate: import("@cn-ui/reactive").ComputedAtom<boolean | undefined>;
onChange(): void | undefined;
};