hplx-react-elements-dev 1.1.42 → 1.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
2
|
export interface InputFieldProps {
|
|
3
3
|
label?: string;
|
|
4
4
|
fieldColor?: string;
|
|
@@ -246,26 +246,30 @@ export interface DropdownItemsProps {
|
|
|
246
246
|
start_icon?: string;
|
|
247
247
|
end_icon?: string;
|
|
248
248
|
value?: any;
|
|
249
|
+
showCheckbox?: boolean;
|
|
249
250
|
active?: boolean;
|
|
250
251
|
disabled?: boolean;
|
|
251
252
|
onSelect?: (value: any) => void;
|
|
252
253
|
ddRef?: any;
|
|
253
254
|
setChangeLeft?: any;
|
|
254
255
|
}
|
|
255
|
-
export
|
|
256
|
+
export type DropdownValue<IsMulti extends boolean> = IsMulti extends true ? DropdownItemsProps[] : DropdownItemsProps;
|
|
257
|
+
export interface DropdownFieldProps<IsMulti extends boolean> {
|
|
256
258
|
label?: string;
|
|
257
259
|
end_icon?: string;
|
|
258
260
|
hint_text?: string;
|
|
259
261
|
hint_text_icon?: string;
|
|
260
262
|
disabled?: boolean;
|
|
261
263
|
errorMsg?: string;
|
|
262
|
-
value?:
|
|
263
|
-
|
|
264
|
+
value?: DropdownValue<IsMulti>;
|
|
265
|
+
isMulti?: IsMulti;
|
|
266
|
+
onChange?: (newValue: DropdownValue<IsMulti>) => void;
|
|
264
267
|
placeholder?: string;
|
|
265
268
|
empty_text?: string;
|
|
266
269
|
options?: Array<DropdownItemsProps>;
|
|
267
270
|
className?: string;
|
|
268
271
|
}
|
|
272
|
+
export type Select = <IsMulti extends boolean = false>(props: DropdownFieldProps<IsMulti>) => ReactElement;
|
|
269
273
|
export interface CardType {
|
|
270
274
|
title: string;
|
|
271
275
|
}
|