Browse Source

ref(modal): Remove backdrop: static option (#43653)

Some final cleanup from https://github.com/getsentry/sentry/pull/43258
and https://github.com/getsentry/getsentry/pull/9273
Malachi Willey 2 years ago
parent
commit
363fb38bc0
1 changed files with 2 additions and 3 deletions
  1. 2 3
      static/app/components/globalModal/index.tsx

+ 2 - 3
static/app/components/globalModal/index.tsx

@@ -21,7 +21,7 @@ type ModalOptions = {
    * Set to `false` to disable the backdrop from being rendered.
    * Set to `false` to disable the backdrop from being rendered.
    * Set to `true` (the default) to show a translucent backdrop.
    * Set to `true` (the default) to show a translucent backdrop.
    */
    */
-  backdrop?: 'static' | boolean; // TODO(malwilley): Remove 'static' when no longer used in getsentry
+  backdrop?: boolean;
   /**
   /**
    * By default, the modal is closed when the backdrop is clicked or the
    * By default, the modal is closed when the backdrop is clicked or the
    * escape key is pressed. This prop allows you to modify that behavior.
    * escape key is pressed. This prop allows you to modify that behavior.
@@ -187,8 +187,7 @@ function GlobalModal({onClose}: Props) {
   const backdrop = options.backdrop ?? true;
   const backdrop = options.backdrop ?? true;
 
 
   const allowBackdropClickClose =
   const allowBackdropClickClose =
-    (closeEvents === 'all' || closeEvents === 'backdrop-click') &&
-    options.backdrop !== 'static';
+    closeEvents === 'all' || closeEvents === 'backdrop-click';
 
 
   // Only close when we directly click outside of the modal.
   // Only close when we directly click outside of the modal.
   const containerRef = useRef<HTMLDivElement>(null);
   const containerRef = useRef<HTMLDivElement>(null);