Skip to content

Commit fad53a5

Browse files
committed
updated modal docs for app gen
1 parent ea0ec17 commit fad53a5

File tree

1 file changed

+18
-3
lines changed
  • packages/ui-extensions/src/surfaces/admin/components

1 file changed

+18
-3
lines changed

packages/ui-extensions/src/surfaces/admin/components/Modal.d.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ export interface ModalProps
4343
| 'heading'
4444
| 'padding'
4545
| 'size'
46-
| 'hideOverlay'
47-
| 'showOverlay'
48-
| 'toggleOverlay'
4946
> {
5047
/**
5148
* Adjust the size of the Modal.
@@ -54,6 +51,24 @@ export interface ModalProps
5451
ModalProps$1['size'],
5552
'small-100' | 'small' | 'base' | 'large' | 'large-100'
5653
>;
54+
/**
55+
* Imperative method to hide the modal. Call this method on the modal element instance (e.g., via a ref).
56+
* This is not a prop, do not pass as an attribute. For hiding via user interaction, use commandFor
57+
* and command="--hide" on buttons, or handle the onHide event.
58+
*/
59+
hideOverlay: () => void;
60+
/**
61+
* Imperative method to show the modal. Call this method on the modal element instance (e.g., via a ref).
62+
* This is not a prop, do not pass as an attribute. For showing via user interaction, use commandFor
63+
* and command="--show" on buttons or links.
64+
*/
65+
showOverlay: () => void;
66+
/**
67+
* Imperative method to toggle the modal's visibility. Call this method on the modal element instance (e.g., via a ref).
68+
* This is not a prop, do not pass as an attribute. For controlling visibility via user interaction,
69+
* prefer using commandFor with command="--show" or command="--hide" on buttons.
70+
*/
71+
toggleOverlay: () => void;
5772
}
5873

5974
export type Styles = string;

0 commit comments

Comments
 (0)