tweak Doctor modal footer UI, replace deprecated UI components (#3331)
Summary: This PR fixes the unaligned checkbox in the Doctor modal (I have based the solution of the Settings modal code) and also replaces deprecated components `FlexRow` and `FlexColumn` in Settings modal. ## Changelog * fix checkbox placement in the Doctor modal footer Pull Request resolved: https://github.com/facebook/flipper/pull/3331 Test Plan: The change has been testes by running the desktop Flipper app locally from source. ## Preview (before & after) <img width="596" alt="Screenshot 2022-01-23 at 16 01 48" src="https://user-images.githubusercontent.com/719641/150685091-ce494847-eea6-4263-900a-2b5541d3d897.png"> <img width="596" alt="Screenshot 2022-01-23 at 16 01 44" src="https://user-images.githubusercontent.com/719641/150685096-29723d14-6cfc-42aa-9564-431a61b1061d.png"> Reviewed By: aigoncharov Differential Revision: D33738683 Pulled By: lblasa fbshipit-source-id: 900657d6cb095d6d32dd412205e714a46e64a564
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d897cfd765
commit
41950946a2
@@ -17,7 +17,7 @@ import {
|
||||
QuestionCircleFilled,
|
||||
LoadingOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import {Layout} from '../ui';
|
||||
import {Layout, styled} from '../ui';
|
||||
import {theme} from 'flipper-plugin';
|
||||
import {
|
||||
startHealthchecks,
|
||||
@@ -161,6 +161,11 @@ function HealthCheckList(props: {report: FlipperDoctor.HealthcheckReport}) {
|
||||
);
|
||||
}
|
||||
|
||||
const FooterContainer = styled(Layout.Horizontal)({
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
});
|
||||
|
||||
function SetupDoctorFooter(props: {
|
||||
onClose: () => void;
|
||||
onRerunDoctor: () => Promise<void>;
|
||||
@@ -172,14 +177,15 @@ function SetupDoctorFooter(props: {
|
||||
return (
|
||||
<Layout.Right>
|
||||
{props.showAcknowledgeCheckbox ? (
|
||||
<Checkbox
|
||||
checked={props.acknowledgeCheck}
|
||||
onChange={(e) => props.onAcknowledgeCheck(e.target.checked)}
|
||||
style={{display: 'flex', alignItems: 'center'}}>
|
||||
<Text style={{fontSize: theme.fontSize.small}}>
|
||||
Do not show warning about these problems at startup
|
||||
</Text>
|
||||
</Checkbox>
|
||||
<FooterContainer>
|
||||
<Checkbox
|
||||
checked={props.acknowledgeCheck}
|
||||
onChange={(e) => props.onAcknowledgeCheck(e.target.checked)}>
|
||||
<Text style={{fontSize: theme.fontSize.small}}>
|
||||
Do not show warning about these problems at startup
|
||||
</Text>
|
||||
</Checkbox>
|
||||
</FooterContainer>
|
||||
) : (
|
||||
<Layout.Container />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user