From 2958d9d8cb32bfa1321d48865fcd6d6baef1ed3e Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Thu, 20 Jul 2023 06:01:01 -0700 Subject: [PATCH] SetupDoctorScreen non-modal option Summary: The Setup Doctor screen was hard-set into a modal window. Instead, make this an optional that defaults to yes. This will allow the usage of the screen in non-modal container. Reviewed By: antonk52 Differential Revision: D47629528 fbshipit-source-id: c5248df1358f1b14775b90c9bf12fd63b8885caf --- .../src/sandy-chrome/SetupDoctorScreen.tsx | 47 +++++++++++++++---- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/desktop/flipper-ui-core/src/sandy-chrome/SetupDoctorScreen.tsx b/desktop/flipper-ui-core/src/sandy-chrome/SetupDoctorScreen.tsx index 687b0861e..9459398c3 100644 --- a/desktop/flipper-ui-core/src/sandy-chrome/SetupDoctorScreen.tsx +++ b/desktop/flipper-ui-core/src/sandy-chrome/SetupDoctorScreen.tsx @@ -9,7 +9,15 @@ import React, {useEffect, useCallback, useMemo, useState} from 'react'; import {useDispatch, useStore} from '../utils/useStore'; -import {Typography, Collapse, Button, Modal, Checkbox, Alert} from 'antd'; +import { + Typography, + Collapse, + Button, + Modal, + Checkbox, + Alert, + Space, +} from 'antd'; import { CheckCircleFilled, CloseCircleFilled, @@ -167,6 +175,7 @@ const FooterContainer = styled(Layout.Horizontal)({ }); function SetupDoctorFooter(props: { + closable: boolean; onClose: () => void; onRerunDoctor: () => Promise; showAcknowledgeCheckbox: boolean; @@ -190,7 +199,7 @@ function SetupDoctorFooter(props: { )} - + {props.closable && }