Skip to content

Commit

Permalink
Change onClose to onOpenChange
Browse files Browse the repository at this point in the history
  • Loading branch information
bsunderhus committed Jun 15, 2022
1 parent 301b9b7 commit 2dba993
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/react-components/react-dialog/Spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,17 @@ type DialogProps = ComponentProps<DialogSlots> & {
*/
defaultOpen?: boolean;
/**
* Callback fired when the component requests to be closed.
* Callback fired when the component changes value from open state.
* @default undefined
*/
onClose?(event: MouseEvent | KeyboardEvent, data: DialogCloseData): void;
onOpenChange?(event: MouseEvent | KeyboardEvent, data: DialogOpenChangeData): void;
};

type DialogCloseData = {
type DialogOpenChangeData = {
/**
* The event source of the callback invocation
*/
type: 'escapeKeyDown' | 'overlayClick' | 'closeButtonClick';
type: 'escapeKeyDown' | 'overlayClick' | 'triggerClick';
/**
* The next value for the internal state of the dialog
*/
Expand Down

0 comments on commit 2dba993

Please sign in to comment.