-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
87a6e7d
commit 2186278
Showing
1 changed file
with
57 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,62 @@ | ||
interface ConfirmDialogProps { | ||
group?: string; | ||
breakpoints?: {[key: string]: string}; | ||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; | ||
|
||
export interface ConfirmDialogBreakpoints { | ||
/** | ||
* Breakpoint for responsive mode. | ||
* | ||
* Example: | ||
* | ||
* <ConfirmDialog :breakpoints="{'960px': '75vw', '640px': '100vw'}" ... /> | ||
* | ||
* Result: | ||
* | ||
* @media screen and (max-width: ${breakpoint[key]}) { | ||
* .p-dialog[attributeSelector] { | ||
* width: ${breakpoint[value]} !important; | ||
* } | ||
* } | ||
*/ | ||
[key: string]: string; | ||
} | ||
|
||
export interface ConfirmDialogProps { | ||
/** | ||
* Optional key to match the key of the confirmation, useful to target a specific confirm dialog instance. | ||
*/ | ||
group?: string | undefined; | ||
/** | ||
* Object literal to define widths per screen size. | ||
* @see ConfirmDialogBreakpoints | ||
*/ | ||
breakpoints?: ConfirmDialogBreakpoints; | ||
} | ||
|
||
export interface ConfirmDialogSlots { | ||
} | ||
|
||
export declare type ConfirmDialogEmits = { | ||
} | ||
|
||
declare class ConfirmDialog { | ||
$props: ConfirmDialogProps; | ||
declare class ConfirmDialog extends ClassComponent<ConfirmDialogProps, ConfirmDialogSlots, ConfirmDialogEmits> { } | ||
|
||
declare module '@vue/runtime-core' { | ||
interface GlobalComponents { | ||
ConfirmDialog: GlobalComponentConstructor<ConfirmDialog> | ||
} | ||
} | ||
|
||
/** | ||
* | ||
* ConfirmDialog uses a Dialog UI that is integrated with the Confirmation API. | ||
* | ||
* Helper API: | ||
* | ||
* - Confirmation API | ||
* - ConfirmationService | ||
* | ||
* Demos: | ||
* | ||
* - [ConfirmDialog](https://www.primefaces.org/primevue/showcase/#/confirmdialog) | ||
* | ||
*/ | ||
export default ConfirmDialog; |