PromoCursed/node_modules/antd/lib/cascader/Panel.d.ts
2024-08-20 23:25:37 +04:00

13 lines
1.1 KiB
TypeScript

import * as React from 'react';
import type { PickType } from 'rc-cascader/lib/Panel';
import type { CascaderProps, DefaultOptionType } from '.';
export type PanelPickType = Exclude<PickType, 'checkable'> | 'multiple' | 'rootClassName';
export type CascaderPanelProps<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType, Multiple extends boolean = boolean> = Pick<CascaderProps<OptionType, ValueField, Multiple>, PanelPickType>;
export type CascaderPanelAutoProps<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType> = (CascaderPanelProps<OptionType, ValueField> & {
multiple?: false;
}) | (CascaderPanelProps<OptionType, ValueField, true> & {
multiple: true;
});
declare function CascaderPanel<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType>(props: CascaderPanelAutoProps<OptionType, ValueField>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
export default CascaderPanel;