Skip to content

Commit

Permalink
fix: add jsdoc for GetModalOptions interface
Browse files Browse the repository at this point in the history
  • Loading branch information
arjita-mitra committed Jan 18, 2024
1 parent fa0aa7f commit 8363051
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/script/E2EIdentity/Modals/Modals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ export enum ModalType {
SNOOZE_REMINDER = 'snooze_reminder',
}

/**
* Options for configuring a modal.
* @typedef {Object} GetModalOptions
* @property {ModalType} type - The type of modal to display.
* @property {Function} [primaryActionFn] - Function to execute for the primary action.
* @property {Function} [secondaryActionFn] - Function to execute for the secondary action.
* @property {boolean} [hideSecondary=false] - Flag to hide the secondary action button.
* @property {boolean} [hidePrimary=false] - Flag to hide the primary action button.
* @property {boolean} [hideClose=false] - Flag to hide the close button.
* @property {Object} [extraParams] - Additional parameters for the modal.
* @property {string} [extraParams.delayTime] - time left to remind the user again for enroll/renewal.
* @property {boolean} [extraParams.isRenewal] - Flag indicating if this is a renewal action.
* @property {boolean} [extraParams.isGracePeriodOver] - Flag indicating if the grace period is over.
*/
interface GetModalOptions {
type: ModalType;
primaryActionFn?: () => void;
Expand Down

0 comments on commit 8363051

Please sign in to comment.