@commercelayer/app-elements 1.5.0 → 1.5.1
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.
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
3
2
|
interface OptionItem {
|
|
4
3
|
/**
|
|
5
4
|
* Item identifier, must be unique and will be used for the onChange callback
|
|
@@ -10,37 +9,6 @@ interface OptionItem {
|
|
|
10
9
|
*/
|
|
11
10
|
content: ReactNode;
|
|
12
11
|
}
|
|
13
|
-
export interface InputRadioGroupProps extends Pick<InputWrapperBaseProps, 'feedback' | 'hint'> {
|
|
14
|
-
/**
|
|
15
|
-
* Text to be displayed on top of the list
|
|
16
|
-
*/
|
|
17
|
-
title?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Input name, will be used to set the html name for all radios
|
|
20
|
-
*/
|
|
21
|
-
name: string;
|
|
22
|
-
/**
|
|
23
|
-
* List of options to render as radio
|
|
24
|
-
*/
|
|
25
|
-
options: OptionItem[];
|
|
26
|
-
/**
|
|
27
|
-
* Default value
|
|
28
|
-
*/
|
|
29
|
-
defaultValue?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Callback triggered when the user update the selection
|
|
32
|
-
*/
|
|
33
|
-
onChange?: (selected: string | undefined) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Show input element
|
|
36
|
-
*/
|
|
37
|
-
showInput?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Define how the item options are rendered
|
|
40
|
-
* @default list
|
|
41
|
-
*/
|
|
42
|
-
viewMode?: 'list' | 'inline' | 'grid';
|
|
43
|
-
}
|
|
44
12
|
export declare const InputRadioGroup: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
45
13
|
title?: string | undefined;
|
|
46
14
|
name: string;
|
|
@@ -57,4 +25,5 @@ export declare const InputRadioGroup: import('../../atoms/SkeletonTemplate').Ske
|
|
|
57
25
|
delayMs?: number | undefined;
|
|
58
26
|
isLoading?: boolean | undefined;
|
|
59
27
|
}>;
|
|
28
|
+
export type InputRadioGroupProps = ComponentProps<typeof InputRadioGroup>;
|
|
60
29
|
export {};
|