Skip to content

Commit

Permalink
Fixed #1731 - New Component: ConfirmPopup
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Dec 22, 2020
1 parent 6ad85ad commit 19dc3d4
Show file tree
Hide file tree
Showing 6 changed files with 396 additions and 2 deletions.
1 change: 1 addition & 0 deletions exports/confirmpopup.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './components/confirmpopup/ConfirmPopup';
3 changes: 3 additions & 0 deletions exports/confirmpopup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use strict';

module.exports = require('./components/confirmpopup/ConfirmPopup');
3 changes: 1 addition & 2 deletions src/assets/style/primereact.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,4 @@
@import '../../components/divider/Divider.css';
@import '../../components/knob/Knob.css';
@import '../../components/splitter/Splitter.css';


@import '../../components/confirmpopup/ConfirmPopup.css';
49 changes: 49 additions & 0 deletions src/components/confirmpopup/ConfirmPopup.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.p-confirm-popup {
position: absolute;
top: 0;
left: 0;
margin-top: 10px;
}

.p-confirm-popup-flipped {
margin-top: 0;
margin-bottom: 10px;
}

.p-confirm-popup:after, .p-confirm-popup:before {
bottom: 100%;
left: calc(var(--overlayArrowLeft, 0) + 1.25rem);
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}

.p-confirm-popup:after {
border-width: 8px;
margin-left: -8px;
}

.p-confirm-popup:before {
border-width: 10px;
margin-left: -10px;
}

.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {
bottom: auto;
top: 100%;
}

.p-confirm-popup.p-confirm-popup-flipped:after {
border-bottom-color: transparent;
}

.p-confirm-popup.p-confirm-popup-flipped:before {
border-bottom-color: transparent
}

.p-confirm-popup .p-confirm-popup-content {
display: flex;
align-items: center;
}
22 changes: 22 additions & 0 deletions src/components/confirmpopup/ConfirmPopup.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as React from 'react';

interface ConfirmPopupProps {
target?: any;
visible?: boolean;
message?: any;
rejectLabel?: string;
acceptLabel?: string;
icon?: string;
rejectIcon?: string;
acceptIcon?: string;
rejectClassName?: string;
acceptClassName?: string;
className?: string;
style?: object;
appendTo?: any;
dismissable?: boolean;
footer?: any;
onHide?(result: string): void;
}

export class ConfirmPopup extends React.Component<ConfirmPopupProps,any> {}
Loading

0 comments on commit 19dc3d4

Please sign in to comment.