phx-react
Version:
PHX REACT
41 lines (40 loc) • 1.55 kB
TypeScript
import * as OutlineIcons from '@heroicons/react/24/outline';
import * as SolidIcons from '@heroicons/react/24/solid';
import React from 'react';
import { ConfigUrlApply, KeyParams } from '../Func/PHXUrlApply/type';
export type IconName = keyof typeof SolidIcons | keyof typeof OutlineIcons;
export type OptionItem = {
content?: string;
icon?: IconName;
iconOutline?: boolean;
active?: boolean;
key?: KeyParams;
listKeyReset?: Array<KeyParams>;
id?: number | any;
destructive?: boolean;
onClick?(): void;
disabled?: boolean;
};
export interface DropdownProps {
className?: string;
buttonContent?: string;
optionTitle?: string;
loading?: boolean;
options?: Array<OptionItem>;
origin?: 'left' | 'right' | 'top-left';
type?: 'default' | 'icon-only' | 'date-picker' | 'ellipsis-icon' | 'soft-small' | 'primary' | 'danger';
defaultDate?: string;
max?: string;
min?: string;
startDisabled?: string;
endDisabled?: string;
disabledDate?: Array<string>;
onChangeDate?(): void;
soft?: boolean;
widthContent?: any;
isFullContentOption?: boolean;
disabled?: boolean;
configUrlApply?: ConfigUrlApply;
onlyResetValueUrl?: boolean;
}
export declare function PHXDropdown({ buttonContent, className, defaultDate, disabledDate, endDisabled, loading, max, min, onChangeDate, optionTitle, options, origin, soft, startDisabled, type, widthContent, isFullContentOption, disabled, configUrlApply, onlyResetValueUrl, }: DropdownProps): React.JSX.Element;