@@ -10,28 +10,28 @@ import type { CustomProps } from '../../../components/types';
10
10
11
11
export interface InterfaceMenuProps extends InterfaceBoxProps < IMenuProps > {
12
12
/**
13
- * Function that returns a React Element. This element will be used as a Trigger for the menu
13
+ * Function that returns a React Element. This element will be used as a Trigger for the menu.
14
14
*/
15
15
trigger : ( _props : any , state : { open : boolean } ) => JSX . Element ;
16
16
/**
17
- * This function will be invoked when menu is opened
17
+ * This function will be invoked when the menu is opened.
18
18
*/
19
19
onOpen ?: ( ) => void ;
20
20
/**
21
- * This function will be invoked when menu is closed. It'll also be called when user attempts to close the menu via Escape key or backdrop press.
21
+ * This function will be invoked when menu is closed. It will also be called when the user attempts to close the menu via Escape key or backdrop press.
22
22
*/
23
23
onClose ?: ( ) => void ;
24
24
/**
25
- * Whether menu should be closed when a menu item is pressed
25
+ * Whether menu should be closed when a menu item is pressed.
26
26
* @default true
27
27
*/
28
28
closeOnSelect ?: boolean ;
29
29
/**
30
- * If true, the menu will be opened by default
30
+ * If true, the menu will be opened by default.
31
31
*/
32
32
defaultIsOpen ?: boolean ;
33
33
/**
34
- * Whether the menu is opened. Useful for conrolling the open state
34
+ * Whether the menu is opened. Useful for controlling the open state.
35
35
*/
36
36
isOpen ?: boolean ;
37
37
/**
@@ -43,7 +43,7 @@ export interface InterfaceMenuProps extends InterfaceBoxProps<IMenuProps> {
43
43
*/
44
44
offset ?: number ;
45
45
/**
46
- * Determines whether menu content should overlap with the trigger
46
+ * Determines whether menu content should overlap with the trigger.
47
47
* @default false
48
48
*/
49
49
shouldOverlapWithTrigger ?: boolean ;
@@ -85,19 +85,19 @@ export interface InterfaceMenuProps extends InterfaceBoxProps<IMenuProps> {
85
85
86
86
export interface IMenuItemProps extends IPressableProps {
87
87
/**
88
- * Children of Menu Item
88
+ * Children of Menu Item.
89
89
*/
90
90
children : string | JSX . Element | Array < JSX . Element > ;
91
91
/**
92
- * Whether menu item is disabled
92
+ * Whether menu item is disabled.
93
93
*/
94
94
isDisabled ?: boolean ;
95
95
/**
96
- * Props to be passed to Text
96
+ * Props to be passed to Text.
97
97
*/
98
98
_text ?: Partial < ITextProps > ;
99
99
/**
100
- * This value will be available for the typeahead menu feature
100
+ * This value will be available for the typeahead menu feature.
101
101
*/
102
102
textValue ?: string ;
103
103
}
@@ -122,11 +122,11 @@ export interface IMenuItemOptionProps extends IMenuItemProps {
122
122
}
123
123
export interface IMenuGroupProps {
124
124
/**
125
- * The title of the menu group
125
+ * The title of the menu group.
126
126
*/
127
127
title : string ;
128
128
/**
129
- * The children of Menu group
129
+ * The children of the Menu group.
130
130
*/
131
131
children : JSX . Element | Array < JSX . Element > ;
132
132
/**
@@ -141,15 +141,15 @@ export interface IMenuOptionGroupProps extends IMenuGroupProps {
141
141
*/
142
142
type : 'radio' | 'checkbox' ;
143
143
/**
144
- * The initial value of the option group
144
+ * The initial value of the option group.
145
145
*/
146
146
defaultValue ?: string | number | string [ ] | number [ ] ;
147
147
/**
148
- * The value of the option group
148
+ * The value of the option group.
149
149
*/
150
150
value ?: string | number | Array < string > | Array < number > ;
151
151
/**
152
- * Function called when selection changes
152
+ * Function called when selection changes.
153
153
*/
154
154
onChange ?: ( val : any ) => void ;
155
155
}
0 commit comments