setVisible(false)}
+ message="Are you sure you want to proceed?"
+ header="Confirmation"
+ icon="pi pi-exclamation-triangle"
+ accept={accept}
+ reject={reject}
+ style={{ width: '50vw' }}
+ breakpoints={{ '1100px': '75vw', '960px': '100vw' }}
+ />
+
+
+ >
+ )
+}
+ `
+ };
+
+ return (
+ <>
+
+
+ ConfirmDialog width can be adjusted per screen size with the breakpoints option where a key defines the max-width for the breakpoint and value for the corresponding width. When no breakpoint matches width defined in style property
+ is used.
+
+
+
+ setVisible(false)}
+ message="Are you sure you want to proceed?"
+ header="Confirmation"
+ icon="pi pi-exclamation-triangle"
+ accept={accept}
+ reject={reject}
+ style={{ width: '50vw' }}
+ breakpoints={{ '1100px': '75vw', '960px': '100vw' }}
+ />
+
+
+
+ >
+ );
+}
diff --git a/pages/confirmdialog/index.js b/pages/confirmdialog/index.js
index 8b17626305..cce3c9c8d6 100644
--- a/pages/confirmdialog/index.js
+++ b/pages/confirmdialog/index.js
@@ -3,14 +3,15 @@ import { DocComponent } from '@/components/doc/common/doccomponent';
import { AccessibilityDoc } from '@/components/doc/confirmdialog/accessibilitydoc';
import { BasicDoc } from '@/components/doc/confirmdialog/basicdoc';
import { DeclarativeDoc } from '@/components/doc/confirmdialog/declarativedoc';
+import { HeadlessDoc } from '@/components/doc/confirmdialog/headlessdoc';
import { ImportDoc } from '@/components/doc/confirmdialog/importdoc';
import { PositionDoc } from '@/components/doc/confirmdialog/positiondoc';
import { PTDoc } from '@/components/doc/confirmdialog/pt/ptdoc';
import { Wireframe } from '@/components/doc/confirmdialog/pt/wireframe';
-import { StyledDoc } from '@/components/doc/confirmdialog/theming/styleddoc';
+import { ResponsiveDoc } from '@/components/doc/confirmdialog/responsivedoc';
import { TemplateDoc } from '@/components/doc/confirmdialog/templatedoc';
+import { StyledDoc } from '@/components/doc/confirmdialog/theming/styleddoc';
import { TailwindDoc } from '@/components/doc/confirmdialog/theming/tailwinddoc';
-import { HeadlessDoc } from '@/components/doc/confirmdialog/headlessdoc';
import { ConfirmDialog } from '@/components/lib/primereact.all';
const ConfirmDialogDemo = () => {
@@ -40,6 +41,11 @@ const ConfirmDialogDemo = () => {
label: 'Template',
component: TemplateDoc
},
+ {
+ id: 'responsive',
+ label: 'Responsive',
+ component: ResponsiveDoc
+ },
{
id: 'headless',
label: 'Headless',