Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3359237
D3616.id11183.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3616.id11183.diff
View Options
diff --git a/web/modals/modal.react.js b/web/modals/modal.react.js
--- a/web/modals/modal.react.js
+++ b/web/modals/modal.react.js
@@ -12,6 +12,7 @@
+name: React.Node,
+icon?: Icon,
+onClose: () => void,
+ +onCloseButton?: boolean,
+children?: React.Node,
+size?: ModalSize,
+fixedHeight?: boolean,
@@ -29,7 +30,15 @@
}
render(): React.Node {
- const { size, children, onClose, fixedHeight, name, icon } = this.props;
+ const {
+ size,
+ children,
+ onClose,
+ fixedHeight,
+ name,
+ icon,
+ onCloseButton,
+ } = this.props;
const overlayClasses = classNames(
css['modal-overlay'],
@@ -43,6 +52,13 @@
const modalClasses = classNames(css['modal'], {
[css['fixed-height-modal']]: fixedHeight,
});
+
+ const cornerCloseButton = onCloseButton ? (
+ <span className={css['modal-close']} onClick={onClose}>
+ <SWMansionIcon size={24} icon="cross" />
+ </span>
+ ) : null;
+
return (
<div
className={overlayClasses}
@@ -54,9 +70,7 @@
<div className={modalContainerClasses}>
<div className={modalClasses}>
<div className={css['modal-header']}>
- <span className={css['modal-close']} onClick={onClose}>
- ×
- </span>
+ {cornerCloseButton}
<h2>
<span>{icon && <SWMansionIcon size={24} icon={icon} />}</span>
{name}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 8:00 AM (21 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578988
Default Alt Text
D3616.id11183.diff (1 KB)
Attached To
Mode
D3616: [web] [fix] [ENG-716] use cross icon in modal
Attached
Detach File
Event Timeline
Log In to Comment