@woosmap/ui 3.121.0 → 3.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -126,7 +126,7 @@ class Modal extends Component {
|
|
|
126
126
|
render() {
|
|
127
127
|
const { open } = this.state;
|
|
128
128
|
|
|
129
|
-
const { title, children, className, isFull, header, testId } = this.props;
|
|
129
|
+
const { title, children, className, isFull, header, testId, noHeader } = this.props;
|
|
130
130
|
const tit = open && title;
|
|
131
131
|
return ReactDOM.createPortal(
|
|
132
132
|
<AnimatePresence>
|
|
@@ -144,7 +144,9 @@ class Modal extends Component {
|
|
|
144
144
|
</div>
|
|
145
145
|
)}
|
|
146
146
|
<div ref={this.getRef()} className="modal__content">
|
|
147
|
-
|
|
147
|
+
{!noHeader && (
|
|
148
|
+
<div className="modal__header">{header || <h1 className="title">{tit}</h1>}</div>
|
|
149
|
+
)}
|
|
148
150
|
<div className="modal__body">{children}</div>
|
|
149
151
|
{this.renderFooter()}
|
|
150
152
|
</div>
|
|
@@ -175,6 +177,7 @@ Modal.defaultProps = {
|
|
|
175
177
|
testId: 'modal',
|
|
176
178
|
closesWithEscape: false,
|
|
177
179
|
displayCloseButtonOutside: false,
|
|
180
|
+
noHeader: false,
|
|
178
181
|
};
|
|
179
182
|
|
|
180
183
|
Modal.propTypes = {
|
|
@@ -196,6 +199,7 @@ Modal.propTypes = {
|
|
|
196
199
|
testId: PropTypes.string,
|
|
197
200
|
closesWithEscape: PropTypes.bool,
|
|
198
201
|
displayCloseButtonOutside: PropTypes.bool,
|
|
202
|
+
noHeader: PropTypes.bool,
|
|
199
203
|
};
|
|
200
204
|
|
|
201
205
|
export default withClickOutside(Modal, '.ignore-click-outside-modal');
|