🏷️ Modal component interface file added
This commit is contained in:
parent
255e7f5021
commit
99d31824c0
69
src/components/modal/IVModal.type.ts
Normal file
69
src/components/modal/IVModal.type.ts
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
import type IVButton from '../button/IVButton.type';
|
||||||
|
import type { DialogBreakpoints } from 'primevue/dialog';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface representing the properties for a Modal component.
|
||||||
|
*/
|
||||||
|
export interface IModal {
|
||||||
|
/**
|
||||||
|
* Optional unique identifier for the modal element.
|
||||||
|
*/
|
||||||
|
modalId?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag indicating whether the modal is currently open.
|
||||||
|
*/
|
||||||
|
opened?: boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of actions (buttons) displayed in the modal.
|
||||||
|
*/
|
||||||
|
actions?: IVButton[]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines if the modal should behave like an alert dialog.
|
||||||
|
*/
|
||||||
|
isAlert?: boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reference to the originating element that triggered the modal,
|
||||||
|
* used to return focus when the modal is closed.
|
||||||
|
*/
|
||||||
|
origin?: { focus: () => void }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Title displayed at the top of the modal.
|
||||||
|
*/
|
||||||
|
title: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optional icon name or path to render next to the title.
|
||||||
|
*/
|
||||||
|
icon?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines the modal size: 'sm' = small, 'md' = medium, 'lg' = large.
|
||||||
|
*/
|
||||||
|
size?: 'sm' | 'md' | 'lg'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accessible label (aria-label) for the close button.
|
||||||
|
*/
|
||||||
|
closeButtonLabel?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tooltip (title attribute) shown when hovering over the close button.
|
||||||
|
*/
|
||||||
|
closeButtonTitle?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extended Modal interface that includes configuration for responsive breakpoints.
|
||||||
|
*/
|
||||||
|
export default interface IVModal extends IModal {
|
||||||
|
/**
|
||||||
|
* Breakpoints used to control responsive modal behavior.
|
||||||
|
* Compatible with PrimeVue Dialog breakpoints format.
|
||||||
|
*/
|
||||||
|
breakpoints?: DialogBreakpoints
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user