Clean up Sheet abstraction

Summary: This stack gets rid of Flippers old sheet abstraction that relies on native (Electron) overlays, and implements it using Ant dialogs instead. Also removes a lot of code by making dialog API imperative, rather than reducer organised, like done in the deeplink handling.

Reviewed By: passy

Differential Revision: D30192001

fbshipit-source-id: 9bca3274bd039207e58f8f9394027515e391671d
This commit is contained in:
Michel Weststrate
2021-10-06 09:08:47 -07:00
committed by Facebook GitHub Bot
parent 740093d0d9
commit 89b193b438
10 changed files with 16 additions and 241 deletions

View File

@@ -7,7 +7,8 @@
* @format
*/
import {Button, FlexColumn, Input, Sheet, styled} from 'flipper';
import {Modal} from 'antd';
import {Button, FlexColumn, Input, styled} from 'flipper';
import React, {useState} from 'react';
import {Bookmark, URI} from '../types';
@@ -55,7 +56,7 @@ export function SaveBookmarkDialog(props: Props) {
return null;
} else {
return (
<Sheet onHideSheet={onHide}>
<Modal visible footer={null} onCancel={onHide}>
{(onHide: () => void) => {
return (
<Container>
@@ -111,7 +112,7 @@ export function SaveBookmarkDialog(props: Props) {
</Container>
);
}}
</Sheet>
</Modal>
);
}
}