Skip to content

Commit 482aaaa

Browse files
committed
IBX-9453: Product Picker category filter (#1434)
1 parent 5ce1072 commit 482aaaa

File tree

2 files changed

+31
-7
lines changed

2 files changed

+31
-7
lines changed

src/bundle/Resources/public/scss/ui/modules/common/_popup.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.c-popup {
2+
$self: &;
3+
24
&__dialog {
35
@include modal-main();
46
}
@@ -53,6 +55,21 @@
5355
}
5456
}
5557

58+
&--has-subheader {
59+
.modal-header {
60+
border-bottom: 0;
61+
padding-bottom: 0;
62+
}
63+
64+
#{$self} {
65+
&__subheader {
66+
border-bottom: calculateRem(1px) solid $ibexa-color-light-500;
67+
padding-bottom: calculateRem(16px);
68+
color: $ibexa-color-dark-400;
69+
}
70+
}
71+
}
72+
5673
.ibexa-label--checkbox-radio {
5774
padding-left: calculateRem(4px);
5875
}

src/bundle/ui-dev/src/modules/common/popup/popup.component.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const Popup = ({
3636
noCloseBtn,
3737
extraClasses,
3838
showTooltip,
39+
subheader,
3940
}) => {
4041
const rootDOMElement = getRootDOMElement();
4142
const modalRef = useRef(null);
@@ -59,6 +60,7 @@ const Popup = ({
5960
const modalClasses = createCssClassNames({
6061
'c-popup modal fade': true,
6162
'c-popup--no-header': noHeader,
63+
'c-popup--has-subheader': !noHeader && subheader,
6264
[extraClasses]: extraClasses,
6365
});
6466
const closeBtnLabel = Translator.trans(/*@Desc("Close")*/ 'popup.close.label', {}, 'ibexa_universal_discovery_widget');
@@ -114,13 +116,16 @@ const Popup = ({
114116
{noHeader
115117
? renderCloseBtn()
116118
: title && (
117-
<div className="modal-header c-popup__header">
118-
<h3 className="modal-title c-popup__headline" title={showTooltip ? title : null}>
119-
<span className="c-popup__title">{title}</span>
120-
{subtitle && <span className="c-popup__subtitle">{subtitle}</span>}
121-
</h3>
122-
{renderCloseBtn()}
123-
</div>
119+
<>
120+
<div className="modal-header c-popup__header">
121+
<h3 className="modal-title c-popup__headline" title={showTooltip ? title : null}>
122+
<span className="c-popup__title">{title}</span>
123+
{subtitle && <span className="c-popup__subtitle">{subtitle}</span>}
124+
</h3>
125+
{renderCloseBtn()}
126+
</div>
127+
{subheader && <div className="c-popup__subheader">{subheader}</div>}
128+
</>
124129
)}
125130
<div className="modal-body c-popup__body">{children}</div>
126131
{!noFooter && (
@@ -170,6 +175,7 @@ Popup.propTypes = {
170175
noKeyboard: PropTypes.bool,
171176
extraClasses: PropTypes.string,
172177
showTooltip: PropTypes.bool,
178+
subheader: PropTypes.node,
173179
};
174180

175181
Popup.defaultProps = {
@@ -184,6 +190,7 @@ Popup.defaultProps = {
184190
title: null,
185191
subtitle: null,
186192
showTooltip: true,
193+
subheader: null,
187194
};
188195

189196
export default Popup;

0 commit comments

Comments
 (0)