elseware-ui 2.17.1 → 2.17.2
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.
|
@@ -4,27 +4,15 @@ export interface CheckboxOption {
|
|
|
4
4
|
label: string;
|
|
5
5
|
value: string;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* Shared props
|
|
9
|
-
*/
|
|
10
7
|
interface BaseCheckboxProps {
|
|
11
8
|
placeholder: string;
|
|
12
9
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Single boolean checkbox (confirmation)
|
|
15
|
-
*/
|
|
16
10
|
interface SingleCheckboxProps extends BaseCheckboxProps {
|
|
17
11
|
options?: never;
|
|
18
12
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Multiple checkbox group
|
|
21
|
-
*/
|
|
22
13
|
interface MultiCheckboxProps extends BaseCheckboxProps {
|
|
23
14
|
options: CheckboxOption[];
|
|
24
15
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Final props type
|
|
27
|
-
*/
|
|
28
16
|
export type CheckboxProps = (SingleCheckboxProps & FieldHookConfig<boolean>) | (MultiCheckboxProps & FieldHookConfig<string[]>);
|
|
29
17
|
declare const Checkbox: React.FC<CheckboxProps>;
|
|
30
18
|
export default Checkbox;
|