Skip to content

Commit

Permalink
IBX-7167: Added tooltip option to popup (#1070)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gengar-i authored Jan 3, 2024
1 parent 405aa51 commit f0ebb55
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const Popup = ({
noHeader,
noCloseBtn,
extraClasses,
showTooltip,
}) => {
const modalRef = useRef(null);
const Translator = getTranslator();
Expand Down Expand Up @@ -99,7 +100,7 @@ const Popup = ({
? renderCloseBtn
: title && (
<div className="modal-header c-popup__header">
<h3 className="modal-title c-popup__headline" title={title}>
<h3 className="modal-title c-popup__headline" title={showTooltip ? title : null}>
<span className="c-popup__title">{title}</span>
{subtitle && <span className="c-popup__subtitle">{subtitle}</span>}
</h3>
Expand Down Expand Up @@ -147,6 +148,7 @@ Popup.propTypes = {
noCloseBtn: PropTypes.bool,
noKeyboard: PropTypes.bool,
extraClasses: PropTypes.string,
showTooltip: PropTypes.bool,
};

Popup.defaultProps = {
Expand All @@ -159,6 +161,7 @@ Popup.defaultProps = {
extraClasses: '',
title: null,
subtitle: null,
showTooltip: true,
};

export default Popup;

0 comments on commit f0ebb55

Please sign in to comment.