Skip to content

Commit

Permalink
fix: align ConfirmPopup arrow directly above trigger for top position (
Browse files Browse the repository at this point in the history
  • Loading branch information
ozantekin authored Sep 18, 2024
1 parent bac55c0 commit f040d81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/lib/confirmpopup/ConfirmPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const ConfirmPopup = React.memo(

const onEnter = () => {
ZIndexUtils.set('overlay', overlayRef.current, (context && context.autoZIndex) || PrimeReact.autoZIndex, (context && context.zIndex.overlay) || PrimeReact.zIndex.overlay);
DomHandler.addStyles(overlayRef.current, { position: 'absolute', top: '50%', left: '50%', marginTop: '10px' });
DomHandler.addStyles(overlayRef.current, { position: 'absolute', top: '0', left: '0' });
align();
};

Expand Down
7 changes: 5 additions & 2 deletions components/lib/confirmpopup/ConfirmPopupBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import { classNames } from '../utils/Utils';

const styles = `
@layer primereact {
.p-confirm-popup {
margin-top: 10px;
}
.p-confirm-popup-flipped {
margin-top: 0;
margin-bottom: 10px;
margin-top: -10px;
}
.p-confirm-popup:after, .p-confirm-popup:before {
Expand Down

0 comments on commit f040d81

Please sign in to comment.