Skip to content

Commit

Permalink
docs: explain trigger function
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcur committed Jan 18, 2024
1 parent 1251762 commit a001700
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions astroplant-frontend/src/Components/ModalDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ export type UseModalConfirmDialogValue = {
/**
* A hook to imperatively trigger a modal confirm dialog.
*
* Calling `trigger` shows the dialog. It returns a promise that resolve to
* whether the dialog was confirmed or not. If `trigger` is called with a
* dialog still outstanding, the previous call to `trigger` resolves to false.
*
* Example:
*
* ```tsx
Expand Down

0 comments on commit a001700

Please sign in to comment.